Your browser sucks, JavaScript disabled! Gunnar's console needs JavaScript and WebAssembly. Git over SSH on port 2222 does not.

nordisk/heimdall

docs/CLI.md

The heimdall command line

Heimdall is a defensive sandbox. Milestone 1 runs wasm jobs only.

heimdall run --job wasm --module <guest.wasm> --trust-root <root.der>... --in <dir> --out <dir>
             [--policy <file>] [--pin-out <file>] [--pin-blake3 <hex>]
             [--decoder <decoder.wasm> [--decoder-pin-blake3 <hex>]]
             [--job-id <32 hex>] [--nonce <64 hex>] [--param key=value]...
             [--seccomp generated|none] [--seccomp-sha256 sha256:<hex>]
heimdall verify-result <out>/result.signed --key <key file | key record>
             [--files <dir>] [--job-id <32 hex> --nonce <64 hex>]
heimdall profile probe|gen|check <workload> [--profiles <dir>] [--libc glibc|musl]
             [--binary <file>] [--only <run>]...

heimdall profile (spec §3)

The syscall profile of a workload is probed, generated and checked from profiles/<workload>/workload.toml (the binary per libc and the probe corpus; format in heimdall_probe::workload). See SECCOMP.md.

Exit codes: 0 done / check passed, 1 check failed, 2 usage error, 3 the workload, binary or a probe run failed (a run that times out or ends with another exit code than its expect_exit fails the probe, naming the run).

heimdall trace (dynamic-trace jobs)

heimdall trace run --layout <dir> --image <sha256:..> [--tracer <heimdall-trace>] --in <dir> --out <dir>
                   --result <file> [--work <dir>] [--pin-out <file>] [--wall-secs 120] [--memory-mib 1024]
                   [--pids 256] [--max-bytes 4194304] [--env K=V]... [--writable <dir>]... -- <command>...
heimdall trace verify <result> --key <pinned key> --files <out dir> [--max-bytes <n>]
heimdall trace diff <baseline.json> <trace.json> [--max-bytes <n>]

run traces the command in a HeimdallRunner job with no network (heimdall-container, its shim found as for every HeimdallRunner) and prints the outcome as one JSON line ({"outcome":"traced",...} or {"outcome":"unknown","reason":...}); --tracer first adds the static tracer to the image as one more layer. verify checks a trace job's signed result and trace.json. diff prints what the trace does beyond the baseline (JSON). Exit codes: 0 traced / clean diff, 1 Unknown / new behaviour or a trace not complete, 2 usage, 3 a file, the key or the runner could not be read or started. See API.md.

Exit codes

Code run verify-result
0 the job ran and was Accepted the result verified and says Accepted
1 — the result did not verify (signature, key, boot, ticket, outputs)
2 usage error, or not in milestone 1 usage error
3 the job could not start (policy, trust roots, guest load, input, out dir, --pin-out) the result or key file could not be read, or the key record is malformed
4 the job ran and was Refused (the signed result was written) the result verified and says Refused