ADR-015 — Pyodide on Deno is the sandbox of the Code node; gVisor stays as the production profile (H8)
Status: accepted (2026-11-13). Scope: src/extractit/nodes/code (T30), deployed by T53;
evidence from T55 (Sandbox review).
Hypothesis H8
"Pyodide on Deno is enough as the sandbox for the user's Python." The risk was that user code
escapes through the JavaScript bridge (import js) to Deno's APIs.
Decision
Keep Pyodide on Deno as the sandbox on every profile and keep gVisor (DX_SANDBOX=deno+gvisor,
runsc, --network none, read-only root) as the production profile of T53, as already designed. H8
is confirmed for the deno profile: 42 escape attempts from user code that already holds the
real __import__ were refused by Deno's permission model, and none reached a listening server, a
host file or the host environment.
Why
- The boundary is not Python's import hook (it is bypassed by the first line of every case): it is Deno started with no network, read, write, env, run, ffi or sys permissions, in a clean environment, under a guardian that kills by time, CPU, memory and output.
- A refusal is a
NotCapableerror inside the sandbox, not an exit of the host process. - The two odd behaviours found fail closed (
os.systemcrashes the runner, a Worker hangs until the wall limit) and give no capability (SEC-011).
Consequences
- The
deno+gvisorprofile was not exercised in T55 (no Linux/runsc here). Before selling to enterprise customers it must be run on the production host with the same battery and a person's pentest (see Pentest checklist). - The battery is a gate (
make security-sandbox): a Deno upgrade that changes a permission behaviour fails it. - If a profile ever runs without the container, the deployment documentation must say the boundary is Deno alone.