feat: support restricted ReadOnlyAccess in elevated Windows sandbox#14610
feat: support restricted ReadOnlyAccess in elevated Windows sandbox#14610viyatb-oai merged 4 commits intomainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
codex/codex-rs/windows-sandbox-rs/src/lib.rs
Lines 278 to 280 in ffcda22
run_windows_sandbox_capture now accepts all ReadOnly policies, but this branch ignores the ReadOnlyAccess variant and always builds the same token path. The legacy restricted-token backend still only applies ACL changes for writable roots, so ReadOnlyAccess::Restricted in RestrictedToken mode does not enforce configured readable roots and can read more than policy intends.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ffcda22ea9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94c55d09a4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
63a8a1c to
933d96b
Compare
Summary
ReadOnlyAccess::Restrictedon Windows in the elevated setup/runner backendinclude_platform_defaultsby adding backend-managed Windows system roots only when requested, while always keeping helper roots and the commandcwdreadableworkspace-writesemantics by keeping writable roots readable when restricted read access is in use in the elevated backendSandboxPolicyis supported on both backends, while richer split-only carveouts still fail closed instead of running with weaker enforcementTesting
cargo test -p codex-windows-sandboxcargo check -p codex-windows-sandbox --tests --target x86_64-pc-windows-msvccargo clippy -p codex-windows-sandbox --tests --target x86_64-pc-windows-msvc -- -D warningscargo test -p codex-core windows_restricted_token_Notes
cargo test -p codex-windows-sandboxon macOS only exercises the non-Windows stubs; the Windows-targeted compile and clippy runs provide the local signal, and GitHub Windows CI exercises the runtime path