Enforce managed deny-read rules in the Windows sandbox - #38660
Merged
copyberry[bot] merged 1 commit intoAug 14, 2026
Merged
Conversation
## Why Windows sandbox requests must preserve managed filesystem deny rules across every execution path and setup refresh. Unsupported policies should fail closed instead of allowing a command to run without the requested protection. ## What changed - Resolve Windows filesystem overrides while constructing each sandbox execution request so both `shell_command` and `exec_command` enforce exact-path and glob deny-read entries. - Carry resolved deny-read paths into Windows sandbox setup refreshes, including workspace-relative entries. - Reject unelevated restricted-token requests that cannot enforce deny-read rules. - Reject recursive globs rooted at a filesystem root unless `glob_scan_max_depth` bounds their expansion. ## Testing Added coverage for deny-read enforcement through both command runtimes, setup refresh resolution, restricted-token failure, and bounded root-level glob scans. GitOrigin-RevId: 33dfa4d1a45b14850cbf58f9173717e3e707d9bf
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/33dfa4d1a45b14850cbf58f9173717e3e707d9bf
branch
from
August 14, 2026 22:29
5465e20 to
848cbad
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/33dfa4d1a45b14850cbf58f9173717e3e707d9bf
branch
August 14, 2026 22:31
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Enforce managed deny-read rules in the Windows sandbox
Why
Windows sandbox requests must preserve managed filesystem deny rules across every execution path and setup refresh. Unsupported policies should fail closed instead of allowing a command to run without the requested protection.
What changed
shell_commandandexec_commandenforce exact-path and glob deny-read entries.glob_scan_max_depthbounds their expansion.Testing
Added coverage for deny-read enforcement through both command runtimes, setup refresh resolution, restricted-token failure, and bounded root-level glob scans.