Repository navigation
feat(shell): opt-in os sandboxing via sandbox-runtime - #1428
Merged
TheGreatAxios merged 1 commit intoOct 15, 2026
Merged
TheGreatAxios merged 1 commit into
TheGreatAxios merged 1 commit into
Conversation
Model-driven child processes now pass through an os-level sandbox wrapper when shell.sandbox.enabled is set (Seatbelt on macOS, bubblewrap+netns on Linux). The wrapper builds its config from the session root, the secret-guard deny list and the permission tiers; a network ask callback routes unconfirmed hosts through the approval gate. Disabled means byte-identical spawn passthrough; enabled-but- unavailable fails closed with an error, never a raw spawn. The os sandbox stays on in yolo mode, which only removes asks. The runtime is pinned exact (scoped package) so beta releases cannot float in. Windows support is alpha upstream and left unwrapped; hosts type config. hooks.ts spawn stays outside the wrapped seams for now.
Contributor
|
Superseded by the comment below. |
Contributor
|
This supersedes the comment above because the rules changed: repository policy version 4 → version 16. Triage: Fail @TheGreatAxios, please address the following:
Not yet confirmed, a maintainer will check:
|
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
@anthropic-ai/sandbox-runtime(pinned exact; scoped package — the unscoped npm name is a documented squatter). Whenshell.sandbox.enabledis set (global settings only, default OFF), every model-reachable child-process seam is wrapped:run_shell(shell-guard plugin), backgroundrun_shell, MCP stdio server spawns, and lifecycle-hook spawn — the hook discovery directory lives inside the model-writable session root, so its spawn is wrapped too, keeping a planted hook from executing outside the OS sandbox in a later session.sandbox-execis deprecated-but-functional upstream (long-term risk named in the ticket).Verification
sandbox-execresists PATH spoofing.bun run checkexit 0: 8964 pass / 0 fail; targeted suites: shell-guard-plugin 45, shell-guard-sandbox 8, background-shell 7, sandbox-config 13, hooks-sandbox (new) all green.@intx/*dedupe re-keying from bun's re-resolve on any dependency change is deterministic (tracked in CL-10681).Fixes CL-10663