Skip to content

#115 M3: cua's own sandbox on Linux, the pinned helper release, vendor host retired - #160

Merged
SSFSKIM merged 23 commits into
mainfrom
feat/115-own-sandbox-m3
Oct 18, 2026
Merged

SSFSKIM merged 23 commits into
mainfrom
feat/115-own-sandbox-m3

Conversation

@SSFSKIM

@SSFSKIM SSFSKIM commented Oct 18, 2026 •

Copy link
Copy Markdown
Owner

Ticket #115, milestone M3 of docs/doperpowers/specs/2026-10-17-own-sandbox-design.md (Plan of Work, "M3 — Linux helper; cua's own host on Linux; confined computer default; vendor host retired").

Merge with a merge commit, not squash or rebase. The helper release linux-sandbox-rust-v0.163.0 was built and attested by workflow run 39110168611 at this branch's commit da0c530c7b8769334f05bc192e85e44ffef6641d, which is also the tag's target. A merge commit keeps that SHA in main's history. The attestation names refs/heads/feat/115-own-sandbox-m3, because the workflow is not on main until this merges.

What changes

  • The Linux helper. .github/workflows/linux-sandbox-helper.yml builds openai/codex's codex-linux-sandbox from rust-v0.163.0 (83086188) for x86_64 and aarch64 musl.
    • The build checks for lockfile drift in place of --locked, remaps paths and strips the binary.
    • Before upload, it scans the binary for secrets and home paths and prints counts only.
    • It attests the build and publishes a release with upstream's LICENSE and NOTICE, MODIFICATIONS.md and SHA256SUMS.
    • The pin is runtime/sandbox/linux-sandbox.json: URL, length and sha256 per asset, plus the attestation run.
  • cua's own host on Linux launches the kernel and the worker under the pinned helper.
    • The helper is re-hashed at every launch and must be an executable file.
    • Install fetches it, refuses bytes that differ from the pin, and restores mode 0755.
    • codex leaves the Linux pins and LINUX_LAYOUT_KEYS. sandboxPolicy/sandboxArgs leave runtime code; the validator lives on as policyTable.
  • Linux deny list: state/, remote/, chrome/ and run/, in every confined mode. Under default, the kernel's cwd and lifeline move to $CUA_HOME/kernel/<session>/, because the helper re-binds only writable roots inside a denied directory (bwrap.rs at 83086188, lines 414-430, 566-669 and 790-800). Other sessions' run directories therefore stay denied in default mode too, as the owner ruled.
  • Linux computer sessions default to scoped. The worker gets network through CUA_REPL_WORKER_NETWORK; the kernel stays restricted.
  • launch_app on Linux is checked against sky_linux's list_apps. The supervisor then runs it outside the sandbox with gio launch.
    • A desktop entry inside any sandbox write root is refused.
    • The scoped preflight and doctor refuse XDG applications roots that overlap a write root.
  • The Linux vendor host is retired. Linux without Node 24 refuses, and an explicit vendor selection is refused.
  • Parity: the configuration-transition entry (linux-computer-default-scoped) declares the 19 native cases' move from disabled to scoped, with no cell differences.

Validation Evidence

All evidence is in docs/evidence/2026-10-17-own-sandbox/m3/README.md.

  • Unit suite: HOME=$(mktemp -d) CUA_NODE=/opt/homebrew/bin/node npm test gives 2832 pass, 0 fail, 78 skipped at fedc016, and 2833 pass, 0 fail at bf7739f.
  • Mods suite: npm run test:mods gives 133/133.
  • Plugin validation: claude plugin validate . passes. Its one warning is about the root CLAUDE.md, which predates M3.
  • Acceptance 1 to 5 on Linux, with the four deny-target creation cases. scripts/accept/own-sandbox.mjs on cua-gce at fedc016 gives ok: true, 82/82 (m3/fedc016/own-sandbox.json). Under default, another session's run directory gives EACCES.
  • Acceptance 7. scripts/accept/linux-native.mjs gives PASS: gedit is launched by launch_app outside the sandbox and typed into through AT-SPI, while the kernel stays confined (m3/fedc016/linux-native.json).
  • Acceptance 8, Linux. scripts/sandbox-probe/linux-helper-compare.mjs runs vendor codex 0.159.2 and cua's 0.163.0 helper side by side and finds them equal across scoped and default × kernel and worker (m3/fedc016/helper-compare.json).
  • Acceptance 12, Linux. The full parity ran at bf7739f, the final code: repl-parity run --device cua-gce --host cua --suite all, then a diff against M0's vendor control with test/repl-parity/expected-differences.json.
    • Result: 493 cases, every assertion passes on the own host, and the diff is ok: true with 0 differences beyond the declared 19-case transition and the Vendor node_repl on Linux runs cells unconfined when the sandbox launcher fails after preflight #135 departure (m3/gce-cua-bf7739f/).
    • Two fields that look wrong but are expected: allAssertionsPassed: false and cases 492 of 493. Both come from the vendor's recorded defect on cells/confinement/no-unsandboxed-fallback, which the vendor fails and the own host passes.
    • First attempt: the run at 43c543d stopped at its first case (m3/gce-cua-43c543d-attempt-1/). The secret fixtures moved the children's HOME into the run directory, and the new scoped preflight correctly refused it. bf7739f fixes the fixtures only; nothing under src/ changed after fedc016.
    • Earlier runs: 65d3ac0 (m3/gce-cua/) and the api-only rerun at fedc016.
  • Helper release. gh attestation verify <asset> --repo SSFSKIM/cua exits 0 for both assets, and the secret and home-path scan of every asset finds nothing (README, "The helper").
  • x64 smoke. A throwaway e2-micro checked the x64 asset's sha256 against the pin and ran a scoped profile as an unprivileged user. The instance was deleted (m3/x64-smoke/).
  • Linux probes at 0.163.0. XShm, app launch and nesting all give the same verdicts as M0 (m3/linux-probes/).

Unresolved Review Findings

  • The api/browser-playwrightlocator/waitfor timing race. The cell's 100 ms deadline races the CDP deadline under load. It is logged in tech-debt-tracker.md, with no comparator allowance added. The task review accepted it.
  • The attestation's ref. Both attestations name the feature branch. If policy ever wants a main-ref attestation, the workflow can be re-run from main after this merges.

Residue

  • README's Linux paragraph still says the Linux computer default is disabled, and src/mcp/surface.mjs:170 has a comment written before the store was denied. M4's documentation work covers both.
  • A native-suite connection closed once with code 1 during native/app/typetext, and two full runs did not reproduce it. The harness discards the connection's stderr, so there is no diagnostic. Capturing that stderr would make a recurrence diagnosable.

…t upstream release commit for x86_64 and aarch64 (musl), attested and released as linux-sandbox-<tag>
…so it can be dispatched before it reaches main; jobs run on dispatch only
… version bump, so the build may set only the workspace members' versions in Cargo.lock and fails on any other change
…oo, whose inlined standard-library paths the binary carried
…inned codex-linux-sandbox (rust-v0.163.0, released as linux-sandbox-rust-v0.163.0); Linux computer sessions default to scoped with only the worker on the network; launch_app runs outside the sandbox through the supervisor; the Linux vendor host is refused; codex leaves the Linux pins; install places the helper, doctor checks it
…rom /proc (the helper's seccomp refuses a child's piped stdio); the Linux secrets connection runs through the own host
…move to the Linux computer default (scoped); managed parity installs take the cached sandbox helper; the broken-launcher lane stands in for the pinned Linux helper; linux-native checks the confined kernel, launch_app outside the sandbox and the refused vendor host; own-sandbox finds the Linux kernel by its command line
…unch, the default-mode deny list, the CLI's helper step; doctor names no vendor rollback on Linux; acceptance 8's Linux helper comparison probe; M3 evidence so far
…before the fixture moves the children's HOME, so Linux creates only the deny targets' leaves
…oped computer default (#115 M3, no cell difference); the live-secrets fixture keeps the connection HOME's ~/.config before moving the children's HOME
… at 65d3ac0: the native configuration transition and the #135 departure accepted, one locator-deadline timing difference), the earlier attempts, and the README's parity section
…ed; the default-mode kernel works in its own directory outside run/ (<home>/kernel/<session>, its TMPDIR that directory's tmp/), made with the session and removed with it
…ox write root, and the scoped preflight refuses XDG applications directories that overlap one; the helper must be a regular executable file (install restores its mode); platform- and surface-aware Node and default-mode network texts; the workflow's privacy guard reports counts only; the waitfor race logged as tech debt
…box 82/82, helper comparison equal, linux-native PASS), the helper's mode refused and restored live, and the api suite rerun equal to the control, waitfor included
…t case; the fedc016 preflight refuses the secret fixtures' HOME moved into the run directory (its XDG applications directory then lies in a write root)
…_DATA_HOME with the connection's HOME when they move the children's HOME into the run directory, so no XDG applications directory lies in a write root and the scoped preflight admits them
… diff against M0's vendor control ok with no difference (transition and #135 accepted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant