Heimdall
Heimdall is a defensive sandbox for Linux, written in Rust. It finds the system calls a program needs and makes a filter from them. The kernel enforces the filter and refuses every other call.
Heimdall was first built for one job only: to inspect untrusted data safely. Short sandboxed jobs parse, verify or scan the data and hand back a signed result. It has since grown into a general system-call filter for programs and services. The static filter exists today. The graph filter is ongoing.
Diagram: 1) the profiler and 2) the static analysis are cross-checked and make the filter (static today, graph ongoing); an optional kernel optimizer uses the same evidence
The full README, with the two filters, the layers and the kernel needs: https://www.gunnar.rs/nordisk/heimdall.
Crates
On crates.io the packages are named nordisk-heimdall-* (the name heimdall-core there belongs to an unrelated project). The library names are unchanged, so code keeps writing use heimdall_core::…:
heimdall-core = { package = "nordisk-heimdall-core", version = "0.4" }
| Package | Library | What it is |
nordisk-heimdall-core |
heimdall_core |
Job, policy and signed-result types, per-boot Ed25519 key, canonical encoding, verification |
nordisk-heimdall-seccomp |
heimdall_seccomp |
Profile types per workload, architecture and libc; a pure-Rust BPF builder; enforcing and audit modes; the USER_NOTIF API |
nordisk-heimdall-probe |
heimdall_probe |
The profiler: learning mode, merge and minimise, the profile generator, the drift check, the OCI seccomp agent |
nordisk-heimdall-profiles |
heimdall_profiles |
The generated, checked-in profiles, compiled into the runners that enforce them |
nordisk-heimdall-broker |
heimdall_broker |
The syscall broker: checks open, socket, connect, bind and exec, and opens the file or socket itself |
nordisk-heimdall-container |
heimdall_container |
The protected native runner (HeimdallRunner): a youki container per job or service with Landlock, seccomp and limits |
nordisk-heimdall-wasm |
heimdall_wasm |
The wasm host: wasmtime components, no WASI, limits, signed guests; the embedder door for a product's own WIT world |
nordisk-heimdall-plain |
heimdall_plain |
The interim youki runner (an ordinary container, no Heimdall protections) |
nordisk-heimdall-run |
heimdall_run |
One wasm job end to end: input dir, guest, output dir, signed result |
nordisk-heimdall-trace |
heimdall_trace |
The dynamic-trace job: a signed trace of what a package's install or import does, and its diff against a baseline |
nordisk-heimdall-scan |
heimdall_scan |
The contract of the static-scanner guests |
nordisk-heimdall-cli |
binary heimdall |
The command line |
Documents
- Commands: docs/CLI.md
- The filters: docs/SECCOMP.md
- The Rust API: docs/API.md
- The specification: docs/SPEC.md
- Releases: CHANGELOG.md, and the SLSA v1.0 provenance of each release, signed with a hardware key: attestations/
Security and contact
SECURITY.md: how to report a vulnerability privately (gunnar@gunnar.rs, subject SECURITY:).
Licence
AGPL-3.0-only, or a commercial licence from the joint owners Ignalina ApS and Vetra Automation AB (COMMERCIAL-LICENSING.md). Exception: nordisk-heimdall-seccomp (the filter builder, since 0.3.5) and the runtime plug heimdall-youki are MIT OR Apache-2.0, so that container runtimes such as youki can use them.