sandbox: flow across a run's checkpoints — an untrusted read closes the sinks that follow #395
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/sandbox-run-flow"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sweep 2026-10-19 item #7, second half, built on the owner's decision. Each sandbox checkpoint was decided alone. A unit could read data an attacker writes and later reach an endpoint it is granted; each call passed its own check, and nothing connected the read to the egress. The
Enforceris stateless by design (C2), so the connection had to be state the run carries explicitly.The sweep placed this in
sandbox-exec-os. Checked on main: exec-os has no per-call checkpoints, since it compiles grants into one static policy and refuses network and process grants. The live checkpoints are insandbox-exec-wasm(S2), and that is where this lands.Design (SPEC §5.8)
Grants.flowdeclares which reads are untrusted (Pathglobs,Kvprefixes, aProgram's output), each with anorigin, and the sinks a tainted run may still reach (Egress/Exec,accepts: [origin]).grants_content_idwhen present, so it is part of the capability surface (§1.2).RunTaint: the origins a run has read. It only grows, so a later clean read restores nothing.taints(source)says which origins a read adds.may_reach(sink, &taint)decides a sink: a tainted run reaches it only iftainted_mayopens it to every origin carried. Entries combine, and*matches any target or origin. An unopened sink is closed.HostStatecarries the taint. Storage reads, kv reads and program output taint the run. A closedegressorexecreturnsTAINTED(-6), which is distinct fromDENIED.conformance/v1/flow.json, and the pack count is now 13.What it does not cover (stated in §5.8):
Docs: SPEC §10's class list was missing C11 and C12; it now lists C11–C13.
Verification (build host)
--locked); every conformance class passes, C13 in code and fromflow.json.-D warningsis clean on the touched crates.Unrelated drift, left out of this PR: running
gen_vectorsalso rewritesattestation.jsonandnegative.jsonwith"mechanism": null. That predates this change.🤖 Generated with Claude Code