mirror of
https://github.com/openai/codex.git
synced 2026-11-12 21:20:34 +00:00
Defer exec-server sandbox preparation to the execution host (#60663)
## Why Remote commands can use workspace paths from a different operating system. Preparing them on the client should preserve those paths and command arguments for the execution host. ## What changed - Build exec-server requests directly, carrying the native command and sandbox context without applying the client's sandbox transform. - Resolve workspace permissions and runtime read access in `SandboxManager` on the execution host, including helper binaries and validated managed-network CA bundles. - Add explicit backend selection and required platform sandbox selection, rejecting launches when the required sandbox is unavailable. ## Testing Extend request tests to cover foreign workspace paths, Unicode arguments, and empty arguments. Extend the remote process test on Unix to verify that restricted reads allow the sandbox helper and validated CA bundle while denying an untrusted certificate file. GitOrigin-RevId: 5fc02ac4208912ecefb80a212742389afc14ac05
This commit is contained in:
@@ -28,6 +28,7 @@ use codex_protocol::models::SandboxEnforcement;
|
||||
use codex_protocol::permissions::NetworkSandboxPolicy;
|
||||
use codex_sandboxing::SandboxCommand;
|
||||
use codex_sandboxing::SandboxManager;
|
||||
use codex_sandboxing::SandboxSelection;
|
||||
use codex_sandboxing::SandboxTransformRequest;
|
||||
use codex_sandboxing::SandboxType as SandboxBackend;
|
||||
use codex_sandboxing::SandboxType::WindowsMxc;
|
||||
@@ -412,7 +413,8 @@ async fn run_command_under_sandbox(
|
||||
},
|
||||
permissions: &permission_profile,
|
||||
workspace_roots: workspace_roots.as_deref(),
|
||||
sandbox,
|
||||
runtime_readable_paths: &[],
|
||||
selection: SandboxSelection::Explicit(sandbox),
|
||||
enforce_managed_network: network.is_some(),
|
||||
network: network.as_ref(),
|
||||
environment_id: None,
|
||||
|
||||
Reference in New Issue
Block a user