mirror of
https://github.com/openai/codex.git
synced 2026-11-18 22:20:48 +00:00
Keep sandbox preparation with the command through launch (#62205)
## What changed - Keep the prepared `SandboxExecRequest` intact in core and let `command/exec` borrow the prepared command for streaming. Windows restricted-token commands continue through the dedicated sandbox launcher. - Move runtime read-path selection for exec-server commands and filesystem helpers into `SandboxManager`. It derives the paths from the executor's binaries and, for managed process launches, finds the generated proxy CA bundle in the command environment. GitOrigin-RevId: 8c9d278496d84589bc4a7b7d0ed08cb1b8e6ba21
This commit is contained in:
@@ -27,6 +27,7 @@ use codex_protocol::models::PermissionProfile;
|
||||
use codex_protocol::models::SandboxEnforcement;
|
||||
use codex_protocol::permissions::NetworkSandboxPolicy;
|
||||
use codex_sandboxing::SandboxCommand;
|
||||
use codex_sandboxing::SandboxExecutables;
|
||||
use codex_sandboxing::SandboxManager;
|
||||
use codex_sandboxing::SandboxNetwork;
|
||||
use codex_sandboxing::SandboxSelection;
|
||||
@@ -437,7 +438,6 @@ async fn run_command_under_sandbox(
|
||||
},
|
||||
permissions: &permission_profile,
|
||||
workspace_roots: workspace_roots.as_deref(),
|
||||
runtime_readable_paths: None,
|
||||
selection: SandboxSelection::Explicit(sandbox),
|
||||
network: SandboxNetwork::new(
|
||||
network.is_some(),
|
||||
@@ -445,7 +445,7 @@ async fn run_command_under_sandbox(
|
||||
/*environment_id*/ None,
|
||||
),
|
||||
sandbox_policy_cwd: &cwd,
|
||||
sandbox_exe: sandbox_exe.as_deref(),
|
||||
executables: SandboxExecutables::Launcher(sandbox_exe.as_deref()),
|
||||
use_legacy_landlock,
|
||||
windows_sandbox_level: WindowsSandboxLevel::Disabled,
|
||||
})?;
|
||||
|
||||
Reference in New Issue
Block a user