pub fn minimal() -> BuilderExpand description
A conservative starting profile that a worker widens for its own needs.
It grants read + execute on /bin and /lib (so a dynamically linked
binary can start), denies all networking, and installs the seccomp
dangerous-syscall baseline (Syscalls::Deny with no extras) — blocking
namespace-escape and kernel-CVE syscalls such as mount, unshare,
pivot_root, and bpf. Because every profile derives from
Profile::deny_all, it also drops all capabilities. A worker typically
starts from here and chains further grants before building:
use sandbox::{Network, profiles};
let profile = profiles::minimal()
.name("my_worker")
.read_exec("/usr/lib")
.network(Network::Unrestricted)
.build();