Upgrades the static-policy scaffold to real kernel isolation. sandbox-container.sh
runs the command in a locked-down container where the KERNEL neutralises escapes:
--network=none (no egress), --read-only rootfs (no out-of-workspace writes),
--pids-limit (fork bombs capped), --memory/--cpus, --cap-drop=ALL +
no-new-privileges, and ONLY the workspace bind-mounted (host $HOME/.ssh
unreachable). Wall-clock timeout goes through the portable tool-exec.sh (macOS
has no coreutils `timeout`); a timed-out container is force-removed.
sandbox-run.sh delegates here when CASAN_SANDBOX_MODE=container (default stays the
static scaffold → phase2 C6 + baseline unchanged); falls back if Docker absent.
phase-c6-sandbox-tests.sh: 6 checks (skip-aware) proving egress/host-read/
out-of-workspace-write fail INSIDE the sandbox while benign workspace writes
land on the host — validated live against Docker (busybox).
Baselines: run-casan4 35/35, adversarial 44/44, phase2 C6 29/29 unchanged.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
C3 (V19) data-exfil-guard.sh: destination-aware egress checkpoint built on the
H4 detectors. cloud/artifact boundaries fail closed on any secret; audit
boundary emits a PII-masked copy (fail closed on an unmaskable secret).
Covers secret-to-cloud, artifact-leaks-env, and PII-in-audit.
C6 (V22) sandbox-run.sh: static policy pre-check (BLOCK on reading ~/.ssh/creds,
network egress, fork bomb, writes outside workspace, huge-file/disk-fill) plus
ulimit file-size/CPU backstops and the wall-clock timeout. HONEST SCOPE: this
is not kernel isolation — the production target (docker --network=none
--read-only --pids-limit / nsjail) is documented as TODO(C6-prod). Process cap
is opt-in so it never breaks legitimate commands on a busy host.
phase2-track-c-tests.sh: 29 adversarial checks (C1 13, C2 6, C3 4, C6 6).
Baselines preserved: run-casan4 35/35, adversarial 44/44.
Running total: 35 + 44 + 25 + 29 = 133 checks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>