Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9651dfd
fix: fail closed for unsupported split windows sandboxing
viyatb-oai Mar 10, 2026
d5813ff
fix: thread sandbox policy cwd through unix escalation
viyatb-oai Mar 12, 2026
baef627
fix: set sandbox policy cwd in app-server exec fixtures
viyatb-oai Mar 12, 2026
cb69855
test: restore windows sandbox exec regressions
viyatb-oai Mar 12, 2026
e902c4b
fix: fail closed split windows sandboxing during transform
viyatb-oai Mar 12, 2026
a85ba0f
fix: clean up windows exec clippy args
viyatb-oai Mar 12, 2026
e17abcb
fix: address windows sandbox review nits
viyatb-oai Mar 13, 2026
d061fa3
fix: support split carveouts in windows restricted token
viyatb-oai Mar 13, 2026
281e806
Merge remote-tracking branch 'origin/main' into codex/viyatb/permissi…
viyatb-oai Mar 18, 2026
8220e20
fix: allow windows sandbox helper args
viyatb-oai Mar 18, 2026
ac18b9d
fix: refresh windows sandbox exec fixtures
viyatb-oai Mar 18, 2026
b3ef8ad
fix: export windows sandbox overlay helper
viyatb-oai Mar 18, 2026
e7279be
refactor: simplify exec request construction
viyatb-oai Mar 18, 2026
4480c00
style: annotate exec request literal args
viyatb-oai Mar 18, 2026
1294bd7
Merge remote-tracking branch 'origin/main' into codex/viyatb/permissi…
viyatb-oai Mar 24, 2026
938357d
Merge remote-tracking branch 'origin/main' into codex/viyatb/permissi…
viyatb-oai Mar 25, 2026
1cbecd2
fix: normalize windows restricted-token overlay roots
viyatb-oai Mar 25, 2026
ac73087
fix: simplify windows overlay deny paths
viyatb-oai Mar 25, 2026
b11a095
fix: format windows overlay path normalization
viyatb-oai Mar 25, 2026
f792715
refactor: tighten windows overlay path type
viyatb-oai Mar 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 30 additions & 30 deletions codex-rs/app-server/src/command_exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -734,21 +734,21 @@ mod tests {
access: ReadOnlyAccess::FullAccess,
network_access: false,
};
ExecRequest {
command: vec!["cmd".to_string()],
cwd: PathBuf::from("."),
env: HashMap::new(),
network: None,
expiration: ExecExpiration::DefaultTimeout,
capture_policy: codex_core::exec::ExecCapturePolicy::ShellTool,
sandbox: SandboxType::WindowsRestrictedToken,
windows_sandbox_level: WindowsSandboxLevel::Disabled,
windows_sandbox_private_desktop: false,
sandbox_policy: sandbox_policy.clone(),
file_system_sandbox_policy: FileSystemSandboxPolicy::from(&sandbox_policy),
network_sandbox_policy: NetworkSandboxPolicy::from(&sandbox_policy),
arg0: None,
}
ExecRequest::new(
vec!["cmd".to_string()],
PathBuf::from("."),
HashMap::new(),
/*network*/ None,
ExecExpiration::DefaultTimeout,
codex_core::exec::ExecCapturePolicy::ShellTool,
SandboxType::WindowsRestrictedToken,
WindowsSandboxLevel::Disabled,
/*windows_sandbox_private_desktop*/ false,
sandbox_policy.clone(),
FileSystemSandboxPolicy::from(&sandbox_policy),
NetworkSandboxPolicy::from(&sandbox_policy),
/*arg0*/ None,
)
}

#[tokio::test]
Expand Down Expand Up @@ -846,21 +846,21 @@ mod tests {
outgoing: Arc::new(OutgoingMessageSender::new(tx)),
request_id: request_id.clone(),
process_id: Some("proc-100".to_string()),
exec_request: ExecRequest {
command: vec!["sh".to_string(), "-lc".to_string(), "sleep 30".to_string()],
cwd: PathBuf::from("."),
env: HashMap::new(),
network: None,
expiration: ExecExpiration::Cancellation(CancellationToken::new()),
capture_policy: codex_core::exec::ExecCapturePolicy::ShellTool,
sandbox: SandboxType::None,
windows_sandbox_level: WindowsSandboxLevel::Disabled,
windows_sandbox_private_desktop: false,
sandbox_policy: sandbox_policy.clone(),
file_system_sandbox_policy: FileSystemSandboxPolicy::from(&sandbox_policy),
network_sandbox_policy: NetworkSandboxPolicy::from(&sandbox_policy),
arg0: None,
},
exec_request: ExecRequest::new(
vec!["sh".to_string(), "-lc".to_string(), "sleep 30".to_string()],
PathBuf::from("."),
HashMap::new(),
/*network*/ None,
ExecExpiration::Cancellation(CancellationToken::new()),
codex_core::exec::ExecCapturePolicy::ShellTool,
SandboxType::None,
WindowsSandboxLevel::Disabled,
/*windows_sandbox_private_desktop*/ false,
sandbox_policy.clone(),
FileSystemSandboxPolicy::from(&sandbox_policy),
NetworkSandboxPolicy::from(&sandbox_policy),
/*arg0*/ None,
),
started_network_proxy: None,
tty: false,
stream_stdin: false,
Expand Down
14 changes: 9 additions & 5 deletions codex-rs/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ Expects the binary containing `codex-core` to run the equivalent of `codex sandb
Legacy `SandboxPolicy` / `sandbox_mode` configs are still supported on Linux.
They can continue to use the legacy Landlock path when the split filesystem
policy is sandbox-equivalent to the legacy model after `cwd` resolution.

Split filesystem policies that need direct `FileSystemSandboxPolicy`
enforcement, such as read-only or denied carveouts under a broader writable
root, automatically route through bubblewrap. The legacy Landlock path is used
Expand Down Expand Up @@ -83,13 +82,18 @@ backend-managed system read roots required for basic execution, such as
`C:\ProgramData`. When it is `false`, those extra system roots are omitted.

The unelevated restricted-token backend still supports the legacy full-read
Windows model only. Restricted read-only policies continue to fail closed there
instead of running with weaker read enforcement.
Windows model for legacy `ReadOnly` and `WorkspaceWrite` behavior. It also
supports a narrow split-filesystem subset: full-read split policies whose
writable roots still match the legacy `WorkspaceWrite` root set, but add extra
read-only carveouts under those writable roots.

New `[permissions]` / split filesystem policies remain supported on Windows
only when they round-trip through the legacy `SandboxPolicy` model without
changing semantics. Richer split-only carveouts still fail closed instead of
running with weaker enforcement.
changing semantics. Policies that would require direct read restriction,
explicit unreadable carveouts, reopened writable descendants under read-only
carveouts, different writable root sets, or split carveout support in the
elevated setup/runner backend still fail closed instead of running with weaker
enforcement.

### All Platforms

Expand Down
Loading
Loading