Updated ADMX for WSLC#40422
Merged
craigloewen-msft merged 7 commits intomasterfrom May 7, 2026
Merged
Conversation
ptrivedi
reviewed
May 5, 2026
benhillis
requested changes
May 5, 2026
Member
benhillis
left a comment
There was a problem hiding this comment.
Some suggestions / questions.
florelis
reviewed
May 5, 2026
OneBlue
reviewed
May 5, 2026
florelis
reviewed
May 5, 2026
benhillis
reviewed
May 6, 2026
OneBlue
reviewed
May 6, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
benhillis
approved these changes
May 7, 2026
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced at the COM wrapper so all callers (wslc.exe, WslcSDK, plugins) are gated through one code path. WslcGetVersion remains unblocked so SDK consumers can probe availability. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix="AllowedRegistry">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, allowed-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced at the COM wrapper so all callers (wslc.exe, WslcSDK, plugins) are gated through one code path. WslcGetVersion remains unblocked so SDK consumers can probe availability. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix="AllowedRegistry">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, allowed-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced at the COM wrapper so all callers (wslc.exe, WslcSDK, plugins) are gated through one code path. WslcGetVersion remains unblocked so SDK consumers can probe availability. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix="AllowedRegistry">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, allowed-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced at the COM wrapper so all callers (wslc.exe, WslcSDK, plugins) are gated through one code path. WslcGetVersion remains unblocked so SDK consumers can probe availability. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix="AllowedRegistry">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, allowed-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced inside WSLCSessionManagerFactory so CoCreateInstance returns WSL_E_CONTAINER_DISABLED directly when the policy is off; every caller (wslc.exe, WslcSDK, plugins) fails fast through one code path rather than getting a manager whose every method errors out individually. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix=\"AllowedRegistry\">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced inside WSLCSessionManagerFactory so CoCreateInstance returns WSL_E_CONTAINER_DISABLED directly when the policy is off; every caller (wslc.exe, WslcSDK, plugins) fails fast through one code path rather than getting a manager whose every method errors out individually. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix=\"AllowedRegistry\">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced inside WSLCSessionManagerFactory so CoCreateInstance returns WSL_E_CONTAINER_DISABLED directly when the policy is off; every caller (wslc.exe, WslcSDK, plugins) fails fast through one code path rather than getting a manager whose every method errors out individually. - WSLContainerCLIRegistryAllowlist: ADMX `<list valuePrefix=\"AllowedRegistry\">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced inside WSLCSessionManagerFactory so CoCreateInstance returns WSL_E_CONTAINER_DISABLED directly when the policy is off; every caller (wslc.exe, WslcSDK, plugins) fails fast through one code path rather than getting a manager whose every method errors out individually. - WSLContainerRegistryAllowlist: ADMX `<list valuePrefix=\"AllowedRegistry\">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
benhillis
pushed a commit
that referenced
this pull request
May 8, 2026
Adds enforcement for two group policies whose ADMX templates landed in PR #40422: - AllowWSLContainer (DWORD): master switch for wslc.exe and the WSLCSessionManager COM API. Enforced inside WSLCSessionManagerFactory so CoCreateInstance returns WSL_E_CONTAINER_DISABLED directly when the policy is off; every caller (wslc.exe, WslcSDK, plugins) fails fast through one code path rather than getting a manager whose every method errors out individually. - WSLContainerRegistryAllowlist: ADMX `<list valuePrefix=\"AllowedRegistry\">` policy stored as a sub-key whose REG_SZ value data is each allowed registry hostname. Enforced in PullImage and PushImage via a shared helper. BuildImage is rejected outright when an allowlist is configured, since the in-VM docker daemon fetches FROM base images through its own pull mechanism and cannot be reliably gated per-registry. The policy is fail-open: an absent or empty sub-key is treated as no restriction, and registry I/O errors fall through to allow rather than break all container operations on a transient hiccup. Adds two new HRESULTs: - WSL_E_CONTAINER_DISABLED (0x33) - WSL_E_REGISTRY_BLOCKED_BY_POLICY (0x34) Adds PolicyTests covering disabled-state, CLI surfacing, allowlist denial, build rejection, and pure-function unit tests for the allowlist evaluator. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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
Updated ADMX values for WSLC controls.
PR Checklist
Completed PR checklist, since it's just an ADMX no big changes or effort needed from the checklist.
Detailed Description of the Pull Request / Additional comments
Simple ADMX change.
Validation Steps Performed
Validated ADMX compiles (It's known that the logic isn't implemented yet)