feat(cli): sandbox public Claude agents with macOS Seatbelt#751
Closed
lilyshen0722 wants to merge 1 commit into
Closed
feat(cli): sandbox public Claude agents with macOS Seatbelt#751lilyshen0722 wants to merge 1 commit into
lilyshen0722 wants to merge 1 commit into
Conversation
samxu01
marked this pull request as ready for review
July 25, 2026 03:16
This was referenced Jul 25, 2026
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.
What changed
workspace/read-onlyagentsWhy
Claude Code's built-in permission model does not confine its whole process or declared MCP children on macOS. A public agent processing untrusted prompts therefore needs a host-native confidentiality boundary around Claude and every child it launches.
This is phase ③ of the public-agent hardening and is intentionally stacked on #750 (phases ①+②). Retarget to
mainafter #750 merges.Verification
RUN_PUBLIC_SANDBOX_ATTACKS=1 node cli/scripts/security/verify-public-claude-seatbelt.mjs— PASS on macOS / Claude Code 2.1.216~/.commonly,~/.ssh, and workspace.commonly/mcp-config.jsoncanaries returned OSEPERM/bin/sh-mediated secret read returned OSEPERMEPERM--forceExitused for the suite's pre-existing open-handle warning)no-undef/no-unused-varscleanExplicit residual
The transient MCP config is outside the model's Read scope and removed after spawn, but a declared MCP server receives its configured token/environment by design. Removing the token-bearing config entirely is phase ④ (env-only injection). This PR does not claim to remove that trusted-capability boundary.
License note
The static Seatbelt baseline is adapted from OpenAI Codex's Apache-2.0 sandbox policy and is attributed in source.