130 kilobytes.
That's the entire Z-Jail binary—a C99 Linux sandbox that packs seven independent defense layers, a seccomp-BPF whitelist of 15 syscalls, pivot_root, full capability dropping, and an evidence-based verdict engine called Truthimatics. No libc dependencies beyond the standard runtime, no Go runtime, no protobuf payload. One make command and you're done.
Seven Layers, Zero Dependencies
Each layer is ordered so later stages can't be undone by earlier ones. The sequence: setrlimit to cap CPU/address space/file count, scrub all inherited file descriptors, lock down core dumps with PR_SET_DUMPABLE=0, pivot_root to detach from the host filesystem, PR_SET_NO_NEW_PRIVS to block setuid escalation, drop every capability and lock securebits, then install a seccomp-BPF filter that only allows the whitelisted 15 syscalls. Only after the child signals readiness does the parent let it execve the target binary. Every step is audited to JSON with BLAKE2b hashing.
How It Compares to Firecracker and gVisor
The README includes a direct comparison table. Z-Jail: ~130 KiB, zero external deps, seccomp whitelist enabled, content hashing, JSON audit. Firecracker: 20+ MiB, requires a microVM (so yes VM isolation), no seccomp whitelist, no content hashing. gVisor: 40+ MiB, Go runtime, no seccomp whitelist, partial audit. bwrap and nsjail are closer in size (70 KiB and 1 MiB respectively) but bwrap lacks seccomp by default and nsjail pulls in libc plus protobuf. Z-Jail fills the gap between minimal bwrap and heavy nsjail—defense-in-depth without a container runtime.
Truthimatics: An Evidence-Based Verdict Engine
Z-Jail includes the public version of Truthimatics, a weighted-observation system that classifies executed binaries as DETERMINISTIC, REJECT, or UNCERTAIN. Each observation carries a weight; any single observation exceeding 50% of the total decides the verdict. It's not a toy—this is designed for auditable, automated code evaluation where a binary's behavior must be judged without human intervention.
For CI pipelines, CTF jail challenges, or any environment where you need to run untrusted native code without pulling in Docker, Firecracker, or a full hypervisor, Z-Jail is the sandbox you can ship inside a single binary.
Source: Show HN: Z-Jail - A 130 KB Linux sandbox-C99 with 7 defense layers and zero deps
Domain: github.com
Comments load interactively on the live page.