mirror of
https://github.com/openai/codex.git
synced 2026-11-06 20:20:34 +00:00
Run sandbox integrity checks before commands and filesystem operations (#51843)
## What changed Wire existing sandbox integrity checks into local command preparation, exec-server process preparation, and sandboxed filesystem helper and file-open operations. Make execution request preparation asynchronous so callers can await the checks. The checks remain observational: failures and timeouts do not prevent command execution. ## Testing Add regression tests that launch a real command after checker preparation fails or exceeds its timeout, verifying successful output and exit status. GitOrigin-RevId: a82399f8aeb8b08f9965e6121b4c7f460552af3f
This commit is contained in:
@@ -1268,9 +1268,11 @@ impl UnifiedExecProcessManager {
|
||||
environment: &codex_exec_server::Environment,
|
||||
) -> Result<UnifiedExecProcess, ToolError> {
|
||||
let mut request = if environment.is_remote() || shell_snapshot.is_some() {
|
||||
attempt.env_for_exec_server(command, options)
|
||||
attempt.env_for_exec_server(command, options).await
|
||||
} else {
|
||||
attempt.env_for(command, options, network, environment_id)
|
||||
attempt
|
||||
.env_for(command, options, network, environment_id)
|
||||
.await
|
||||
}
|
||||
.map_err(ToolError::Codex)?;
|
||||
let network_policy_decider = network_proxy_launch
|
||||
|
||||
Reference in New Issue
Block a user