Address review follow-up on WSLContainerRegistryAllowlist policy - #41306
Merged
beena352 merged 2 commits intoAug 11, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR is a follow-up to the earlier registry allowlist enforcement work, refining how the WSLContainerRegistryAllowlist policy is read and improving the corresponding PolicyTests assertions for BuildKit denial output.
Changes:
- Refactors allowlist snapshot reading to open the allowlist sub-key directly from the policies root.
- Updates policy tests to assert BuildKit denial output via wildcard pattern matching (explicit vs implicit
alpinereference). - Simplifies snapshot logic testing to exercise the “from policies root” path.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| test/windows/PolicyTests.cpp | Tightens build-block test assertions to match the full BuildKit denial line using VerifyPatternMatch, and consolidates allowlist snapshot tests around the “from policies root” helper. |
| src/windows/inc/wslpolicies.h | Refactors allowlist snapshot reading to take the allowlist sub-key directly and opens that sub-key in one RegOpenKeyExW call from HKLM. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
beena352
marked this pull request as ready for review
August 10, 2026 20:16
Blue (OneBlue)
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Follow-up to #41211 addressing review nits: open the allowlist sub-key directly, throw an "invalid policy" error at the read site, and tighten build-block test assertions to full-message pattern match.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed