holger-scan-worker: one filter per job type (PROPOSED)
PROPOSED, not pinned. Holger does not use these filters: its pinned profile is still the measured part alone (SCAN_WORKER_SHA256, kept in measured/ as the reference). They wait for the owner, and are input for Holger's next line (h40); nothing in Holger points here.
Heimdall is a defensive sandbox. This directory holds the static seccomp filters of the static (musl) holger-scan-worker. Two owner rules make them:
- the filter allows the UNION of two parts, never one part alone (2026-11-11);
- one filter per job type, never one over the whole binary (2026-11-12). The worker runs several programs (
job_runner::programs::rundispatches them); each job type gets the calls of its own entry and its own runs only. The earlier whole-binary union (88 rules) is gone.
for each [[job]] J of workload.toml (scan, app-graph):
measured M_J = heimdall profile gen --job J (the runs of J alone) jobs/J/x86_64-musl.json
possible G_J = Mímir's possible set reached from J's roots, J's cuts jobs/J/graph/holger_scan_worker.possible.json
filter U_J = M_J ∪ G_J jobs/J/union/x86_64-musl.{json,oci.json,rs}
a call in M_J keeps M_J's rule (G_J has no arguments)
a call only in G_J is allowed with any arguments (review.bare, and a note naming them)
a name in G_J the arch does not know is never allowed (review.unknown)
cargo heimdall union holger-scan-worker --profiles profiles --workspace <holger> --bin holger-scan-worker --package holger-scan-worker --libc musl --target x86_64-unknown-linux-musl --graph g --out u --job scan --job app-graph made them (Holger h38 db37e86, 2026-11-12). profiles/tests/holger_scan_worker_union.rs checks, per job: the measured part is gen --job of the checked-in evidence, the possible part's scope is the job's roots and cuts, the filter is exactly what union makes of the two parts and holds both; the scan filter has none of the app-graph job's process and network calls; there is no whole-binary union; this README says PROPOSED.
| job | entry (root) | filter | measured | only from the possible set | possible calls |
scan |
sandbox::worker::run, sandbox::scan_program (cut: serve, probe, probe_job, holger-sandbox::remote) |
44 | 31 | 13 | 39 |
app-graph |
job_runner::app_graph::run |
108 | 88 | 20 | 70 |
The app-graph job's measured part covers the whole job tree: the worker and the git, cargo, rustc and cargo-lens it starts (a seccomp filter is inherited). Its possible part is the worker's own code only.
Holger's third job type, verify-bundle, has runs in the evidence (8) but no filter here: a graph of it at db37e86 needs a Holger build, and Holger 3.8 and older are not built again (owner, 2026-11-12). The guide (docs/MIMIR-HEIMDALL-FROM-ZERO.md, section 3) has its h37 numbers.
The evidence (workload.toml, x86_64-musl.probe.json)
workload.toml is Holger's (measured/workload.toml) plus the two [[job]] rows. x86_64-musl.probe.json is Holger's committed evidence (measured/, h37) with two app-graph runs merged in (a run adds to the evidence and never takes a call out):
- scan: the 80
NNN-scan-*runs of Holger's measurement (below,measured/). - app-graph:
101-app-graph-wa-missand102-app-graph-wa-reach. Holger'sserver/scan-worker/tests/app_graph_under_heimdall.rs(h38db37e86) ran on a real kernel (Heimdall shim 0.5.5) in the builder worker rootfs, staged ascargo xtask builder-worker stagewrites it, behind a shim that keeps each job's request,config.jsonand/in. Each kept job then ran again underheimdall profile probe-exec(CLI 0.7.0, musl) in its own shape: the rootfs read-only,/inread-only, an empty/outand/work, a 64 MiB/tmp, the job's rlimits and env, uid 1, no capability, no-new-privileges, a stand-in of the test's registry on the captured port. Both gave the test's outcomes: wa-miss refused (holger-apps-14,absent-one@0.1.0, absent-two@2.0.0), wa-reach accepted with itsgraph-package.znippy.
Under heimdall profile enforce, each app-graph run passes under its own filter with the same outcome, and dies by SIGSYS (exit 159) under the scan filter.
The reference (measured/)
Holger h37 94aec350, scripts/scan-worker-profile.sh on build-1 (image nordisk-cargo-toolchain:heim-m0-b1, Heimdall shim 0.5.5 and CLI 0.6.1 from crates.io): capture through server/scan-worker/tests/worker_seccomp_profile.rs (5/5), then heimdall profile probe-exec on each of the 60 kept jobs, MERGED onto Holger's committed evidence (the script's rule: a run adds to the evidence and never takes a call out), then heimdall profile gen. The result is Holger's pinned profile byte for byte: .oci.json sha256 e25a640934a41cb6f9b10b337c21151a51a328f67d16659fd5d534f8ef694e43 (SCAN_WORKER_SHA256). The 60 fresh jobs called nothing outside it. Only clone3 (errno 38) was not called again; it stays because the merge keeps it. measured/workload.toml is Holger's, copied unchanged. At h37 549f6e138 the pinned profile is the same bytes.
The corpus (corpus/)
MANIFEST.sha256 lists the 47 files of HOLGER_PROFILE_PACKAGES (<format>/<file>) with their sha256.
-
Holger's list (13 files):
fetch.shfetches the 12 public ones by name and checks each sha256: Debian, Maven Central, npm, PyPI, crates.io, the GitHub release of the helm chart, the Fedora 42 archive. The pip wheel is namedpip-24.3.1-py2.py3-none-any.whlin Holger's list; PyPI calls it-py3-, with the same bytes.raw/cli-64.exeis the one in every setuptools wheel, andraw/gunnar-fast-setup.pdfis Gunnar'sdocs/.oci/alpine-3.21.oci.taris a freshpodman save --format oci-archiveofalpine:3.21(another sha256, as in Holger's earlier re-measurements). -
The additions (34 files):
additions.py(deterministic: run it twice, the same sha256s) adds the following from Holger's in-repo fixtures (h37) and fixed generators:- a znippy format: a graph package, a bundle fixture, two hostile bundles and one truncated file;
- broken inputs per format: truncated archives, a bad ar magic, a bad rpm lead, a zip central directory past the end, an OCI tar without
index.json, an empty zip, and the fuzz corpus's metadata files filed as packages; - more real packages: cfg-if, sigstore, and sampleproject (wheel and sdist);
- bombs: a 256 MiB deflate member in a wheel and a jar, and a 256 MiB tar member in a crate and an npm tarball.
Holger's own made-up subjects (the gzip bomb, EICAR, secrets, model files, an empty file) come from the test itself.