nono
Capability-based sandboxing library using Landlock (Linux) and Seatbelt (macOS).
Overview
nono provides OS-enforced sandboxing where unauthorized operations are structurally impossible. Once a sandbox is applied, there is no API to expand permissions - the kernel enforces all restrictions.
Installation
[]
= "0.1"
Usage
use ;
// Build a capability set
let mut caps = new;
caps.allow_read?;
caps.allow_write?;
caps.allow_execute?;
// Apply the sandbox (irreversible)
apply?;
// All subsequent operations are restricted to granted capabilities
Features
- Landlock (Linux 5.13+) - Filesystem access control
- Seatbelt (macOS) - Filesystem and network restrictions
- No escape hatch - Once applied, restrictions cannot be lifted
- Child process inheritance - All spawned processes inherit restrictions
Platform Support
| Platform | Mechanism | Minimum Version |
|---|---|---|
| Linux | Landlock | Kernel 5.13+ |
| macOS | Seatbelt | 10.5+ |
Documentation
License
Apache-2.0