Skip to content

Unrestricted residents never read or write credentials (Joel 10-18: keep creds off-limits), on #5164 - #5170

Merged
joelteply merged 1 commit into
fable/land-m5-provingfrom
c6241c04/unrestricted-residents-never-read-or-wri
Oct 18, 2026
Merged

joelteply merged 1 commit into
fable/land-m5-provingfrom
c6241c04/unrestricted-residents-never-read-or-wri

Conversation

@joelteply

@joelteply joelteply commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Card c6241c04. Stacked on #5164 (base fable/land-m5-proving). Joel decided on 2026-10-18, answering on #5164's unconfined residents: "Keep creds off-limits". Residents stay unrestricted except for credentials. A resident quotes tool output into rooms, and a room reaches every enrolled peer across operators.

What changes

  • A resident gets HOST reach instead of no confinement (Confinement::reaching_host, set in confinement_of for CallerSource::LocalPersona). She may touch everything the operator's process may, except:
    • the credential stores: CARVED_OUT_HOME_ENTRIES, extended to .ssh, .gnupg, .aws, .kube, .netrc, .git-credentials, .npmrc, .pypirc, .docker/config.json, .cargo/credentials{,.toml}, .config/{gh,gcloud,github-copilot}, .claude, .codex, .airc/identity{,.key}, shell histories, Library/Keychains, plus the existing four;
    • every scope's signing key wherever it sits, <repo>/.airc/identity.key (CREDENTIAL_SUFFIXES). The deploy checkout's key is an agent's, so a resident holding it could sign as that agent;
    • every other citizen's directory (hers is kept).
  • One policy, every path:
    • seatbelt (macOS) renders denials only (seatbelt_host_profile), so a directory she creates after her shell started is hers;
    • landlock (Linux) grants / carved around the denials, with the carved parents listable;
    • code/read, write and edit check the same denials (ReadScope::Host { deny }), including through a link she names and inside her own workspace.
  • Who else is affected:
    • The operator is unchanged, except that the file verbs now refuse scope keys.
    • Callers from outside this node keep workspace reach.
  • Bug fixed in carve(): it judged only the child on the way to the FIRST carve-out, so that child's siblings were granted whole, even a sibling that was itself a carve-out (.aws beside .ssh) or held one (.config holding .config/gh). This was harmless with the old four, widely separated carve-outs, and fatal for a whole-host grant.

Tests (new)

  • a_resident_reaches_the_host_except_every_credential_and_other_citizens: the allow list, including "no granted root contains a denial", the assertion the carve defect fails.
  • on_macos_a_residents_child_reaches_the_host_but_never_a_credential: real sandbox-exec. It checks that:
    • Documents is readable, a fresh directory can be made and written, and ls ~ works;
    • .ssh, gh hosts, a scope key and another citizen's directory are all refused with "Operation not permitted";
    • a write into .ssh is refused and the key file is unchanged.
  • host_scope_refuses_every_credential_path_however_it_is_named: the file verbs, covering direct reads, a link, a key inside the workspace, and writes.
  • Updated: a_resident_reaches_the_host_but_its_credentials_and_an_outside_peer_is_confined.

Not verified by me

  • I did NOT compile it. The fleet rule is no core compiles on IntelMac. All five edited files parse (rustfmt), and source-hygiene passes (32/0). The macOS kernel test needs an M5 run: please run cargo test -p continuum-core --lib confinement path_security code_commands there.
  • Known gaps (a denylist by Joel's decision):
    • Windows has no per-process sandbox, so on the 5090 the file verbs refuse credentials but a resident's shell does not. Every spawn emits a shell.confinement.unavailable probe, as before Land the M5 proving build: what the residents run, measured on the node #5164.
    • Landlock cannot match a scope key by suffix, and no Linux node hosts residents today.
    • Landlock's carved grant is a snapshot per spawn.

Measured

None yet. After deploy on the M5, the check is: a resident's code/shell cat ~/.ssh/<anything> returns "Operation not permitted" and ls ~ works. Owner: Cormac, with Fable running it. Deadline: 2026-10-19. The card stays open until that receipt is posted.

🤖 Generated with Claude Code

https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE

…rd c6241c04)

Joel 2026-10-18, on #5164's unconfined residents: "Keep creds off-limits".
A resident quotes tool output into rooms, and a room reaches every
enrolled peer across operators.

A resident now gets HOST reach (Confinement::reaching_host) instead of no
confinement. That is everything the operator's process may touch except
the credential stores, every scope's signing key (<repo>/.airc/identity.key)
and other citizens' directories. One policy covers both enforcement paths:
- seatbelt renders denials only (seatbelt_host_profile), so a directory
  she creates after her shell started is hers;
- landlock grants the host carved around the denials, with carved parents
  listable;
- code/read, write and edit check the same denials (ReadScope::Host
  { deny }), including through a link and inside her own workspace.
The operator is unchanged except that scope keys are refused to the file
verbs. Callers from outside this node keep workspace reach.

Also fixes carve(): it judged only the child on the way to the FIRST
carve-out, so its siblings were granted whole, even when a sibling was a
carve-out (.aws beside .ssh) or held one (.config holding .config/gh).
Harmless with the old four widely separated carve-outs, fatal for a
whole-host grant.

Windows has no per-process sandbox: the file verbs refuse credentials
there, but a resident's shell does not (shell.confinement.unavailable
probe on every spawn, as before #5164).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
@joelteply joelteply changed the title fix(code): unrestricted residents never read or write credentials (card c6241c04) Unrestricted residents never read or write credentials (Joel 10-18: keep creds off-limits), on #5164 Oct 18, 2026
@joelteply
joelteply changed the base branch from canary to fable/land-m5-proving October 18, 2026 20:20
@joelteply

Copy link
Copy Markdown
Contributor Author

PASSED at 1f0105d. Reviewed by Fable (M5), 2026-10-18.

The claim I verified: under host reach, a resident can read the operator's files, make and write a fresh directory, and list ~, and is refused .ssh, the gh hosts file, a scope's identity.key and another citizen's directory. The refusal is the OS's own "Operation not permitted", and the key file is left untouched.

How: cargo test -p continuum-core --lib --features metal,accelerate -- confinement path_security code_commands on the M5 (macOS 26) printed 44 passed, 0 failed. That includes on_macos_a_residents_child_reaches_the_host_but_never_a_credential. I also read credential_roots() and CARVED_OUT_HOME_ENTRIES (mod.rs:34-48 and 335): ~/.continuum/config.env (HF_TOKEN) and ~/.cache/huggingface/token are on the list, as Joel asked.

Not verified here: the landlock (Linux) path, which needs a Linux run.

🤖 Generated with Claude Code

@joelteply
joelteply merged commit 6991383 into fable/land-m5-proving Oct 18, 2026
9 checks passed
@joelteply
joelteply deleted the c6241c04/unrestricted-residents-never-read-or-wri branch October 18, 2026 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant