Skip to content

docs(core): the agent sandbox, what it isolates and what it does not (0.6.0) - #56

Merged
SaulBuilds merged 2 commits into
mainfrom
docs/v60-agent-sandbox-limits
Nov 30, 2026
Merged

SaulBuilds merged 2 commits into
mainfrom
docs/v60-agent-sandbox-limits

Conversation

@SaulBuilds

Copy link
Copy Markdown
Contributor

The agent sandbox page (0.6.0)

Adds content/core/agent-sandbox.md (/core/agent-sandbox, public tier): what the agent sandbox isolates at HIC-3 and what it does not, per platform, so nothing in the product overclaims.

  • How HIC-3 depends on Core's launch record (a session without an enforced sandbox runs at HIC-1 and says so).
  • What is isolated on every platform: writes, reads, the work folder's .git and .env files, network (relay-only, fixed host list, port 443, every connection recorded; none without the relay).
  • A per-platform table: macOS Seatbelt, Linux bubblewrap, Windows AppContainer plus a Job Object; git inside; whether shell_run commands are sandboxed.
  • Windows limits in this version, stated plainly: no git or null device inside the sandbox (with the exact refusal text), commands not sandboxed, folders every app may read, protections cover what exists at launch, permission changes are put back at session end, other programs running as the member are not limited, and the test machines (Windows Server 2022/2025, admin and standard user; Windows 11 not yet measured).
  • Status: implemented in the agent runtime; until Core starts a platform's sessions in its sandbox, HIC-3 there runs at HIC-1.

Sources: citrate-agent-runtime agent-shell (agent_sandbox.rs, agent_sandbox_windows.rs, windows_refusal.rs from runtime#143, sandbox.rs) and citrate-core lanes/l2/hic/sandbox_launch.rs, store.rs. content-lint passes locally; truth-lint runs in CI.

Docs only. It describes a sandbox, so it gets one independent review rather than the docs-only exemption.

🤖 Generated with Claude Code

https://claude.ai/code/session_019cgBjEUXiPasw1yPyGXkXC

…(0.6.0)

A member-facing page at /core/agent-sandbox: how HIC-3 depends on the
launch record, what the sandbox isolates on every platform, a per-platform
table (macOS Seatbelt, Linux bubblewrap, Windows AppContainer plus a Job
Object), and the Windows limits in this version stated plainly: no git or
null device inside (the refusal text), commands not sandboxed, folders
every app may read, protections cover what exists at launch, and where
the Windows tests were measured. Status: implemented in the agent
runtime; a session Core has not started in a sandbox runs at HIC-1.

Signed-off-by: Larry Klosowski <larryklosowski@proton.me>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019cgBjEUXiPasw1yPyGXkXC
@SaulBuilds
SaulBuilds requested a review from a team as a code owner November 30, 2026 10:08
@SaulBuilds

Copy link
Copy Markdown
Contributor Author

Independent review (Claude R4) @67481e45: CHANGES (one claim needs its platform limits; everything else checks out)

Verified against the code:

  • HIC-3 needs an enforced launch record, and a root Core never counts. Core lanes/l2/hic/sandbox_launch.rs:342-350: self.enforced && self.core_euid != 0, and no record or not enforced means HIC-1.
  • Egress: agent-egress/src/lib.rs COMPILED_ALLOWLIST is port 443 only, with npm, PyPI, crates.io (+ index/static), the Go proxy, GitHub (+ api/codeload), binaries.soliditylang.org and rpc.citrate.ai, so "a fixed list ... on port 443 only" is accurate.
  • The quoted Windows message is byte-equal to NEEDS_GIT_OR_NULL_DEVICE in agent-runtime#143 (agent-shell/src/windows_refusal.rs:25), so it merges after #143 as the line says.
  • The .git protection and the .env.example / .env.sample exemption match sandbox.rs and agent_sandbox.rs.

Finding 1 (P2, claim honesty on a member-facing security page). "What the sandbox isolates ... the .env files at the top of the work folder are hidden from the agent", stated "on every platform", omits two limits the code documents:

  • Linux (agent_sandbox.rs:45-47) masks only the .env* files at the top of the worktree that exist when the session starts; nested ones are not masked.
  • Windows (agent_sandbox_windows.rs:22-23) has the same "Linux backend's coverage".
  • macOS masks .env* at any depth and in any letter case.

Failing scenario: a member with a monorepo keeps services/api/.env holding a database password and reads this page. On Linux or Windows the agent can read that file, but the page leads them to believe .env files are hidden.

Fix: say "at the top of the work folder" plus a per-platform row: macOS at any depth, Linux and Windows only at the top and only those present at start. Move the "Protections cover what exists when the session starts" bullet from the Windows section to a Linux-and-Windows note. Advise keeping secrets out of nested .env files.

Non-blocking notes:

  1. The frontmatter author: Larry Klosowski + Claude Opus 5.5 differs from the federation convention (author: Larry Klosowski).
  2. audited_against_sha: 72a888c: say which repo that sha belongs to, since the page cites two.

@BerryManifold BerryManifold left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Codex static review of 67481e45b9edf98e9e060f7868e956dd4d3b830b is complete. Result: incomplete; details retained privately. Details and coverage limits are recorded in the project's private review log. No tests were executed by this reviewer. Both account submissions represent the same Codex review, not independent reviews.

@Matr0xshka Matr0xshka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Codex static review of 67481e45b9edf98e9e060f7868e956dd4d3b830b is complete. Result: incomplete; details retained privately. Details and coverage limits are recorded in the project's private review log. No tests were executed by this reviewer. Both account submissions represent the same Codex review, not independent reviews.

…w fix)

R4: on Linux and Windows only the .env files at the top of the work
folder at session start are hidden; nested ones are readable. macOS
hides them at any depth.

Signed-off-by: Larry Klosowski <larryklosowski@proton.me>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019cgBjEUXiPasw1yPyGXkXC
@SaulBuilds

Copy link
Copy Markdown
Contributor Author

Independent review (Claude R4b) @c79fab4e45148ae2efa6967ad6cb40ce4ef93c71: APPROVE

Re-review after Claude R4 CHANGES @67481e45. Delta is one paragraph in content/core/agent-sandbox.md.

  • Finding 1 is fixed. The bullet now says .env files are hidden on macOS at any depth, and on Linux and Windows only the ones at the top of the work folder when the session starts, and that a .env in a subfolder is readable there. Checked against citrate-agent-runtime main: agent_sandbox.rs module doc ("macOS: at any depth ...; Linux: only the ones at the top of the worktree when the session starts; nested ones are not masked"), sandbox.rs Seatbelt rule /\.env[^/]*$ (any depth) and the bwrap mask over the write roots' top level, and agent_sandbox_windows.rs ("the .env* files at the top of the worktree at launch ... the Linux backend's coverage"). The page no longer over-claims.
  • Template exemption (.env.example, .env.sample) unchanged and still matches the code.
  • No em-dashes, no reward or token language.
  • CI at this head: build, check, guardrail, secret-scan, chain-sync, CodeQL JS/actions green; ci and CodeQL rust running at review time.

Merge order: as the line says, this quotes the Windows refusal text from citrate-agent-runtime#143 (still open), so merge this after #143 lands.

Non-blocking (carried from R4, unchanged): author: frontmatter differs from the federation convention (Larry Klosowski); audited_against_sha: 72a888c does not say which of the two cited repos it belongs to. Optional: the "Protections cover what exists when the session starts" bullet in the Windows section applies to Linux too.

@BerryManifold BerryManifold left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Codex static review of c79fab4e45148ae2efa6967ad6cb40ce4ef93c71 is complete. Result: blockers; details retained privately. Details and coverage limits are recorded in the project's private review log. No tests were executed by this reviewer. Both account submissions represent the same Codex review, not independent reviews.

@Matr0xshka Matr0xshka left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Codex static review of c79fab4e45148ae2efa6967ad6cb40ce4ef93c71 is complete. Result: blockers; details retained privately. Details and coverage limits are recorded in the project's private review log. No tests were executed by this reviewer. Both account submissions represent the same Codex review, not independent reviews.

@SaulBuilds
SaulBuilds merged commit cefdf8f into main Nov 30, 2026
10 checks passed
@SaulBuilds
SaulBuilds deleted the docs/v60-agent-sandbox-limits branch November 30, 2026 17:46
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.

3 participants