Z-Jail is a minimal Linux sandbox written in C99, occupying only 130 KB with zero dependencies. It implements seven layers of defense for process confinement, aiming to provide a lightweight security solution for sandboxing applications.
Background
Z-Jail is a minimal Linux sandbox (130 KB) written in C99 that restricts untrusted programs using seven layers of defense: seccomp, Linux namespaces (PID, net, mount, UTS), chroot, seccomp-bpf, capabilities dropping, rlimits, and a read-only root filesystem. It has zero external dependencies beyond the Linux kernel itself. This sits in the tradition of tools like Firejail, Bubblewrap, and nsjail but aims for extreme minimalism and simplicity — a single small binary with no libraries. The author targets use cases where you need to safely run a script or binary from an unknown source without full containerization or a VM. For HN readers, the appeal is the tiny attack surface and audibility: a 130 KB C program with no dependencies is far easier to review and trust than a full container runtime.