P0: enforce Enabled network via isolated netns and managed proxy - #55
Merged
Merged
Conversation
…oxy. Restricted stays fail-closed OS deny; Enabled without the Linux helper is PROCESS_SPAWN_FAILED rather than host FullAccess. Co-authored-by: Cursor <cursoragent@cursor.com>
Clear Codex's default NO_PROXY after apply_to_env so loopback clients cannot bypass the helper proxy, and drop the unused isolation prepare_plan wrapper. Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SandboxNetwork::Enabledmapped to Codex Enabled +--allow-network-for-proxy. Restricted stays--unshare-net+ Restricted seccompexec; Enabled starts helper-ownedNetworkProxythen spawn+waits Codex argv.network(restricted|enabled, default restricted) selects the axis. MCP profiles andLIVE_TOOLSare unchanged;{ "network": true }is not a grant. Probe failure + Enabled isPROCESS_SPAWN_FAILED(no host FullAccess fallback).workspace_infoadvertisesenforcement=enforcedfor both axes when the Linux helper wraps spawn. Bilingual docs + prepare/isolation/MCP tests.Test plan
cargo test -p codespace-linux-sandbox-protocol -p codespace-policy -p codespace-domain -p codespace-runner -p codespace-servercargo test --manifest-path crates/linux-sandbox/Cargo.toml(Linux CI withCODESPACE_REQUIRE_LINUX_SANDBOX=1for isolation HTTP-via-proxy)scripts/check-no-model-deps.shandpython3 -B scripts/check_docs.py checknetwork.policy=restricted; operatornetwork: enabledadvertisesenabledwithout raising Write/ExecMade with Cursor