Run exec-server fs operations through sandbox helper (#17294)

## Summary
- run exec-server filesystem RPCs requiring sandboxing through a
`codex-fs` arg0 helper over stdin/stdout
- keep direct local filesystem execution for `DangerFullAccess` and
external sandbox policies
- remove the standalone exec-server binary path in favor of top-level
arg0 dispatch/runtime paths
- add sandbox escape regression coverage for local and remote filesystem
paths

## Validation
- `just fmt`
- `git diff --check`
- remote devbox: `cd codex-rs && bazel test --bes_backend=
--bes_results_url= //codex-rs/exec-server:all` (6/6 passed)

---------

Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
starr-openai
2026-04-12 18:36:03 -07:00
committed by GitHub
co-authored by Codex
parent 7c1e41c8b6
commit d626dc3895
52 changed files with 2313 additions and 895 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ trap cleanup EXIT INT TERM HUP
(
cd "$cargo_root"
cargo run -p codex-exec-server -- --listen "$listen_url"
cargo run -p codex-cli --bin codex -- exec-server --listen "$listen_url"
) >"$stdout_log" 2>"$stderr_log" &
server_pid="$!"
@@ -40,7 +40,7 @@ for _ in $(seq 1 "$((start_timeout_seconds * 20))"); do
if ! kill -0 "$server_pid" >/dev/null 2>&1; then
cat "$stderr_log" >&2 || true
cat "$stdout_log" >&2 || true
echo "failed to start codex-exec-server" >&2
echo "failed to start codex exec-server" >&2
exit 1
fi
@@ -50,7 +50,7 @@ done
if [[ -z "$exec_server_url" ]]; then
cat "$stderr_log" >&2 || true
cat "$stdout_log" >&2 || true
echo "timed out waiting ${start_timeout_seconds}s for codex-exec-server to report its websocket URL" >&2
echo "timed out waiting ${start_timeout_seconds}s for codex exec-server to report its websocket URL" >&2
exit 1
fi