mirror of
https://github.com/openai/codex.git
synced 2026-04-28 00:25:56 +00:00
feat(sandbox): enforce proxy-aware network routing in sandbox (#11113)
## Summary - expand proxy env injection to cover common tool env vars (`HTTP_PROXY`/`HTTPS_PROXY`/`ALL_PROXY`/`NO_PROXY` families + tool-specific variants) - harden macOS Seatbelt network policy generation to route through inferred loopback proxy endpoints and fail closed when proxy env is malformed - thread proxy-aware Linux sandbox flags and add minimal bwrap netns isolation hook for restricted non-proxy runs - add/refresh tests for proxy env wiring, Seatbelt policy generation, and Linux sandbox argument wiring
This commit is contained in:
@@ -190,6 +190,7 @@ assert os.read(master, 4) == b"ping""#
|
||||
&policy,
|
||||
sandbox_cwd.as_path(),
|
||||
StdioPolicy::RedirectForShellTool,
|
||||
None,
|
||||
HashMap::new(),
|
||||
)
|
||||
.await
|
||||
@@ -242,6 +243,7 @@ async fn java_home_finds_runtime_under_seatbelt() {
|
||||
&policy,
|
||||
sandbox_cwd.as_path(),
|
||||
StdioPolicy::RedirectForShellTool,
|
||||
None,
|
||||
env,
|
||||
)
|
||||
.await
|
||||
@@ -298,6 +300,7 @@ async fn touch(path: &Path, policy: &SandboxPolicy) -> bool {
|
||||
policy,
|
||||
sandbox_cwd.as_path(),
|
||||
StdioPolicy::RedirectForShellTool,
|
||||
None,
|
||||
HashMap::new(),
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user