Expand description
Isolation policy for running untrusted commands on fleet nodes.
SandboxSpec is deliberately data, not behaviour: a side-effect-free
description of what a command may touch. It serializes to JSON so a policy
is reviewable in a pull request and testable with no hypervisor, no
/dev/kvm, and no VM to boot.
Sandbox is the execution seam. A backend turns a spec plus a command
into an outcome; Sandbox::is_isolated reports honestly whether the
backend actually enforced anything, so a degraded run is visible rather
than silently unprotected.
No hypervisor backend is wired up yet. The libkrun one cannot be built or tested on this machine - libkrun is Linux-only in nixpkgs - so it lives behind a feature gate rather than shipping unexercised FFI.
Modules§
- vfkit
- macOS sandbox backend built on
vfkit(Virtualization.framework).
Structs§
- Direct
Sandbox - A backend that enforces nothing; the default when no hypervisor is available.
- Sandbox
Command - A command to run inside a sandbox.
- Sandbox
Output - What a sandboxed command produced.
- Sandbox
Spec - What a sandboxed command is permitted to touch.
Enums§
- Network
Policy - Whether a sandboxed command may reach the network.
- Sandbox
Error - Why a sandbox could not run a command.
- Spec
Error - Why a
SandboxSpecis not enforceable.
Traits§
- Sandbox
- Executes commands under an isolation policy.