P0 linux-sandbox: wrap exec_command through an isolated Codex helper - #53
Merged
Merged
Conversation
Keep the process supervisor unchanged and probe-gate bubblewrap/seccomp so Restricted network is enforced without an unsandboxed fallback. Co-authored-by: Cursor <cursoragent@cursor.com>
…lock. Fresh resolves mixed alpha.4 core crates with stable leaf crates; require locked CI, a successful Linux helper probe, and no silent Enabled-network downgrade. Co-authored-by: Cursor <cursoragent@cursor.com>
Use target cfg branches instead of asserting on cfg! constants in the runner and linux-sandbox isolation tests. This preserves the Linux-required CI semantics without suppressing Clippy warnings.
Regenerate the isolated codex-runtime lock after codespace-runner gained the linux-sandbox path dependency. Keep CI --locked; no manifest or runtime behavior changes.
novelKR
force-pushed
the
cursor/p0-linux-sandbox
branch
from
September 18, 2026 17:37
628e074 to
909d3b7
Compare
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
crates/linux-sandboxadapter (codespace-linux-sandbox) atspawn_pipe/spawn_ptyso user argv is wrapped by the pinned Codex helper (bubblewrap, thenno_new_privs+ seccomp). The process supervisor (process_id, stdin, terminate, timeout, PTY, lease) is unchanged./tmp. Codex namedworkspace-write(including.gitRO) is not reused. This WP hard-denies network (--unshare-net+ Restricted seccomp); proxy /Enabledis the next subgraph.CODESPACE_LINUX_SANDBOX_BINor a helper next to the executable) gates both spawn and advertisement. Success advertisescommand_sandbox=linux-sandboxand Restrictednetwork.enforcement=enforced. Failure (macOS, no bwrap) keeps direct argv andnone. A later setup/spawn error isPROCESS_SPAWN_FAILEDwith no unsandboxed fallback.Test plan
cargo fmt(root +crates/linux-sandbox)./scripts/check-no-model-deps.shpython3 -B scripts/check_docs.pyCODESPACE_LINUX_SANDBOX_BINthencargo test --workspace/tmp, AF_INET denied / AF_UNIX allowed, PTY isatty + stdin roundtrip, SIGTERM reaps the sandbox treeworkspace_info.execution.isolation.command_sandboxislinux-sandboxonly when probe succeeds;protocol_compattool set unchangedMade with Cursor