You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #131 added sandbox_id/kinds filters to ClaimLeaseRequest so a well-behaved guest agent only claims work for its own sandbox. The API enforces these filters, but the guest agent and the worker it runs under still share one worker-scoped bearer token — the filters are request parameters the guest agent chooses to send, not a credential the server can independently verify. A compromised or malicious guest can simply omit sandbox_id/kinds and claim any lease its shared token's capabilities allow, including run_command jobs destined for a different sandbox.
The doc comment on ClaimLeaseRequest in sandboxwich-core says this plainly:
This is advisory, not a security boundary: the guest agent and the worker it runs under share one worker-scoped token ... The server-side filtering below narrows the default blast radius of a well-behaved agent claiming the wrong job; it does not stop an adversarial one. A real fix needs per-sandbox claim tokens.
Evidence
crates/sandboxwich-core/src/lib.rs:1710-1723 — ClaimLeaseRequest struct and doc comment stating the advisory-only scoping and calling for per-sandbox claim tokens.
docs/capabilities.md:16 — "Guest-agent lease claim scoping" is listed as Experimental for this reason.
Mint a distinct, sandbox-bound claim credential (separate from the existing sandbox-bound guest token used for other guest routes) that the API can verify server-side when a lease claim comes in, rather than trusting a client-supplied sandbox_id/kinds filter. This closes the gap between "guest agent claims only its own sandbox's work by convention" and "guest agent claims only its own sandbox's work because the server enforces it."
Relationship to ROADMAP promotion gates
Blocks the Authorization promotion gate in ROADMAP.md, which requires "Tenant, operator, worker, and guest principals have separate credentials and route permissions" — today the guest and worker principals share a credential for lease claiming.
Status
A PR addressing this is in progress today (parallel effort) — not yet numbered.
Problem
PR #131 added
sandbox_id/kindsfilters toClaimLeaseRequestso a well-behaved guest agent only claims work for its own sandbox. The API enforces these filters, but the guest agent and the worker it runs under still share one worker-scoped bearer token — the filters are request parameters the guest agent chooses to send, not a credential the server can independently verify. A compromised or malicious guest can simply omitsandbox_id/kindsand claim any lease its shared token's capabilities allow, includingrun_commandjobs destined for a different sandbox.The doc comment on
ClaimLeaseRequestinsandboxwich-coresays this plainly:Evidence
crates/sandboxwich-core/src/lib.rs:1710-1723—ClaimLeaseRequeststruct and doc comment stating the advisory-only scoping and calling for per-sandbox claim tokens.docs/capabilities.md:16— "Guest-agent lease claim scoping" is listed as Experimental for this reason.Suggested approach
Mint a distinct, sandbox-bound claim credential (separate from the existing sandbox-bound guest token used for other guest routes) that the API can verify server-side when a lease claim comes in, rather than trusting a client-supplied
sandbox_id/kindsfilter. This closes the gap between "guest agent claims only its own sandbox's work by convention" and "guest agent claims only its own sandbox's work because the server enforces it."Relationship to ROADMAP promotion gates
Blocks the Authorization promotion gate in ROADMAP.md, which requires "Tenant, operator, worker, and guest principals have separate credentials and route permissions" — today the guest and worker principals share a credential for lease claiming.
Status
A PR addressing this is in progress today (parallel effort) — not yet numbered.