Skip to content

Enforce configured network proxy in codex sandbox#27035

Merged
viyatb-oai merged 5 commits into
mainfrom
codex/viyatb/enforce-sandbox-network-proxy
Jun 8, 2026
Merged

Enforce configured network proxy in codex sandbox#27035
viyatb-oai merged 5 commits into
mainfrom
codex/viyatb/enforce-sandbox-network-proxy

Conversation

@viyatb-oai

@viyatb-oai viyatb-oai commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator

Why

codex sandbox can start a network proxy from a configured permission profile. Previously, sandbox-level containment was tied to managed network requirements rather than whether a proxy was actually active. This meant config-driven proxy policies were not consistently enforced as the sandbox's only network path.

What changed

  • Enable proxy-only network containment whenever codex sandbox starts a network proxy.
  • Apply the same active-proxy check to the macOS and Linux sandbox paths.
  • Add a Linux regression test that verifies a sandboxed command cannot establish a direct connection while the configured proxy is active.

Test plan

  • just test -p codex-cli debug_sandbox::tests
  • sandbox_with_network_proxy_blocks_direct_loopback_access runs on Linux to cover the config-driven proxy path end to end.

Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai changed the title [codex] Enforce configured network proxy in sandbox command Enforce configured network proxy in codex sandbox Jun 8, 2026
Co-authored-by: Codex noreply@openai.com
@bolinfest bolinfest marked this pull request as ready for review June 8, 2026 18:27
Comment thread codex-rs/cli/src/debug_sandbox.rs Outdated
Comment thread codex-rs/cli/tests/sandbox_network_proxy.rs
Comment thread codex-rs/cli/tests/sandbox_network_proxy.rs Outdated
Comment thread codex-rs/cli/tests/sandbox_network_proxy.rs Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2a15fb7d4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/cli/src/debug_sandbox.rs Outdated
Comment thread codex-rs/cli/tests/sandbox_network_proxy.rs
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
Co-authored-by: Codex noreply@openai.com
@viyatb-oai viyatb-oai merged commit 85fd52f into main Jun 8, 2026
31 checks passed
@viyatb-oai viyatb-oai deleted the codex/viyatb/enforce-sandbox-network-proxy branch June 8, 2026 21:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants