Make sandbox isolation mandatory; remove unsandboxed direct mode #10
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Every gateway start emits this WARN — visible in our own dogfood logs:
The gateway runs untrusted code (linters, parsers, optional tool-use) against arbitrary PR contents. The "direct mode" fallback when
AR_SANDBOX_IMAGEis unset is a footgun: it Just Works for local development, which trains operators to ship without isolation. The threat model indocs/THREAT-MODEL.mdand ADR-0002 already classify this as Kudelski-class RCE risk.Premise: people can't be trusted to do the right thing — make the secure path the only path.
Proposed change:
AR_SANDBOX_IMAGEbecomes required at startup; the gateway refuses to start without it (clear error message: "AR_SANDBOX_IMAGE is required; install Docker/Podman and set it to your sandbox image. See deploy/Dockerfile.sandbox.").$PATH.auto_review/sandbox:<version>so operators don't need to build their own. Reference it in QUICKSTART so the lazy/copy-paste path is the secure path.AR_DANGEROUSLY_DISABLE_SANDBOX=1enables direct mode — env-var name carries the warning, gateway logs aterrorlevel, and it's documented as test-only. CI for this repo + integration tests can use it; nothing else should.Touches:
crates/ar-sandbox/,crates/ar-gateway/src/lib.rs(env-var validation at startup),docs/OPERATIONS.md,docs/THREAT-MODEL.md,deploy/{Dockerfile.sandbox,helm,systemd},QUICKSTART.md.Migration: existing operators get a hard error on first restart after upgrade. The error message links to QUICKSTART. Acceptable break since the unsafe default has always been documented as unsafe.