Skip to content

Enforce managed deny-read rules in the Windows sandbox - #38660

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/33dfa4d1a45b14850cbf58f9173717e3e707d9bf
Aug 14, 2026
Merged

Enforce managed deny-read rules in the Windows sandbox#38660
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/33dfa4d1a45b14850cbf58f9173717e3e707d9bf

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 14, 2026

Copy link
Copy Markdown

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

  • 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.

## 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
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/33dfa4d1a45b14850cbf58f9173717e3e707d9bf branch from 5465e20 to 848cbad Compare August 14, 2026 22:29
@copyberry
copyberry Bot merged commit 848cbad into main Aug 14, 2026
26 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/33dfa4d1a45b14850cbf58f9173717e3e707d9bf branch August 14, 2026 22:31
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants