#391 feat(sbx1): SBX1.3 session-lifetime Docker+runsc worker runtime - #916
#391 feat(sbx1): SBX1.3 session-lifetime Docker+runsc worker runtime#916hachej wants to merge 14 commits into
Conversation
Add purpose-typed invocation secrets, stable runtime errors, atomic nonce replay protection, and canonical request digests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uy8snWzDKyjZBhsFco4Du5
Implement the fixed Docker profile, dirfd workspace helper, project quotas and host reserve, PID1 supervisor, secret-clean containers, and bounded session lifecycle. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uy8snWzDKyjZBhsFco4Du5
Add the unit fault matrix, gated real-runsc lifecycle harness, non-admitting raw evidence, proof ledger, and tracked slice plan/state. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Uy8snWzDKyjZBhsFco4Du5
Security-fix proof of workHead: Remote branch verification: Resolved the adversarial-review must-fix findings:
Representative adversarial coverage includes ordinary-env model keys, forged credential kind/classification, tenant socket and queued dead-peer requests, populated nested quota trees, preflight/post-preflight/in-tree hardlinks, transient removal failures across expiry/create/shutdown/secret replacement, later-invocation blocking after replacement failure, exact FD3 frame/name/metadata bounds, callback failures, and unknown wire codes. Local proof:
GitHub CI: 14 passed, 0 failed. An unrelated Pi-native E2E property-test flake passed on the isolated rerun; no source change was made for it. Deferred gates were appended to SBX1.4/SBX1.5 in draft PR #918 ( PR #916 remains unmerged. |
|
Parked for salvage: tracked as factory epic #1081 (branch preserved for rebase when scheduled). |
…ng + credential-ref contract (#1163) * #1081 feat(sandbox): salvage SBX1.3 slice 1 — V1 remote-worker request hardening + credential-ref contract Salvaged from closed PR #916 (feat/808-sbx1-3-runtime), first mergeable slice only: - shared remoteWorkerProtocolV1 extensions and invocationSecretsV1 value-free 16f.1 provider-credential-ref wire schema - remote-worker V1 provider request hardening: request digest binding, single-use nonce store, tenant binding checks, pair-proxy and protocol-client updates - agent credential contract additions (sandboxDelivery reference delivery, bindings) and stable error codes Excluded (later slices): runsc session-lifetime runtime, Go workload and quota helper, integration script, evidence docs. Respects SBX1.4/1.5 gates (bb6e328, d3a1bd3): no V0 remote-worker changes, no fleet admission. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QtPPbToGDvkARQZuYKFyWN * test(sandbox): tie credential-ref wire schema to agent contract at compile time Adds a types-only .test-d.ts asserting ProviderCredentialRefWireV1 stays in lockstep with agent's ProviderCredentialRefV1: agent->wire assignability, wire == debranded agent shape, and version-literal equality. Fails tsc --noEmit if either side drifts. Closes #1198 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QtPPbToGDvkARQZuYKFyWN * #1081 feat(sandbox): salvage runsc session runtime TS (#1174) --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
…ntegration harness (#1183) * #1081 feat(sandbox): salvage SBX1.3 slice 1 — V1 remote-worker request hardening + credential-ref contract Salvaged from closed PR #916 (feat/808-sbx1-3-runtime), first mergeable slice only: - shared remoteWorkerProtocolV1 extensions and invocationSecretsV1 value-free 16f.1 provider-credential-ref wire schema - remote-worker V1 provider request hardening: request digest binding, single-use nonce store, tenant binding checks, pair-proxy and protocol-client updates - agent credential contract additions (sandboxDelivery reference delivery, bindings) and stable error codes Excluded (later slices): runsc session-lifetime runtime, Go workload and quota helper, integration script, evidence docs. Respects SBX1.4/1.5 gates (bb6e328, d3a1bd3): no V0 remote-worker changes, no fleet admission. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QtPPbToGDvkARQZuYKFyWN * #1081 feat(sandbox): salvage runsc session runtime TS * #1081 feat(sandbox): salvage runsc Go runtime harness --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Bead:
wt-391-forward-6gd.3/ issue #808What this PR delivers
Security fixes from the adversarial review
envand legacy caller-classifiedsecretEnv, including ordinaryOPENAI_API_KEYand forgedsandbox-invocation-secretrequests.command.Env; credentials use the shared bounded binary frame and are inherited by the authorized tenant invocation only on FD 3./workspaceread-only and replaces the container before and after it, preventing workspace or container-local state from reaching a later differently-authorized invocation.openat2, snapshot validation, fail-closed hardlink/symlink handling, and recursive verification.REMOTE_WORKER_INCOMPLETE_CLEANUP; the wire schema accepts only the stable error-code union.Local verification
pnpm -C packages/boring-sandbox typecheckpnpm -C packages/boring-sandbox test— 51 files, 493 tests passedgo test ./...— 19 tests passedgo test ./...— 8 tests passedpnpm lint:invariantspnpm -C packages/agent typecheckand credential-contract testsExplicitly deferred deployment gates
wt-391-forward-6gd.4: pin the workload/helper image to qualified evidence beforestartContainer; use a persistent or boot-epoch nonce so replay cannot survive worker restart or a second process.wt-391-forward-6gd.5: admitting real-runsc evidence for openat2 workspace enforcement, project-quota disk/inode fill plus reserve, fork-bomb/PID limit, output flood, and orphan-cleanup failure on a cohort where runsc openat2 works.Those gates are recorded separately in draft PR #918. The current cohort’s real-runsc/openat2 evidence remains non-admitting; this PR does not claim those deferred deployment proofs.
Do not merge as part of this security-fix pass.