content-facts attestor
Records two facts about every file the traced build read, computed at attest time while the read files and the products are both still on disk: what the file's bytes are, and whether those bytes appear verbatim inside a product. A verifier that holds only digests cannot compute either one later. The vulnhash engine reads them to tell a start-up configuration read (a locale table, a zoneinfo file, openssl.) from data the build put into its product.
| Name | content- |
|---|---|
| Predicate type | https: |
| Lifecycle | postproduct |
| Default binary? | No |
| Category | build (primary) |
| Recommended trace | full — benefits from full eBPF trace |
| Auto-attaches when |
|
The facts in this box are generated from the CI/lock binary's own catalog (cilock tools list). Do not hand-edit — run npm run gen:.
What it captures
The attestor runs after command-run and product. Its inputs are the sha256 of every file in each traced process's openedfiles and versionReads, and the leaves of the product tree. For each read file whose bytes on disk still hash to the recorded digest (8 MiB or less), it records a class:
data: TZif (zoneinfo), a glibc locale category file, a gettext.mo,ld.,so. cache locale-,archive gconv-;modules. cache text-: UTF-8 INI text with at least oneconfig [section]and only comments, sections andkeylines;= value code: ELF, Mach-O, PE,#!scripts, wasm, JVM class, Lua bytecode, CPython.pyc,ar, zip;unknown: anything else.
Each data or text- file of at least 16 bytes is then searched for, with bytes., in every product file. Gzip, zip (stored and deflated) and tar are expanded, nested to depth 4, so an npm .tgz, a wheel and a container image tar are searched member by member. Only plain zips are read: no prefix other than a launcher script (a Python zipapp, an executable jar), unique entry names, store or deflate, every byte accounted for by the listed entries and the central directory; any other zip shape makes the scan incomplete. A pre-POSIX tar is found by its header checksum, and GNU sparse entries are read reconstructed. A product is scanned only when its bytes on disk hash to the digest in the product tree.
Predicate fields, all keyed by hex sha256:
class,size: per read file.checked,inProduct: per searched file;inProductmeans the bytes were found.complete,reason:falsewith a reason when any product could not be searched completely. ThencheckedandinProductare empty.productDigests: sorted digests of the products scanned.scanner: the rule set,contentfacts/.v0.3
Why this shape
The predicate carries facts about bytes, never a verdict about a package. Whether a read is build environment is decided by the engine from these facts plus the trace. The rules are a copy of the vulnhash engine's content.; scanner names the copy so the two cannot drift silently.
Validate it locally
cilock run --step build --trace -a content-facts -o build.att.json -- go build -o app .
jq '.payload | @base64d | fromjson | .predicate.attestations[] | select(.type | contains("content-facts")) | .attestation' build.att.jsonA Go binary that imports time/ shows its zoneinfo reads with inProduct:.
How a verifier consumes this
Use the facts only when complete is true and productDigests equals the set of product digests in the same signed collection. A read file with no class, or with checked absent, has no content fact: treat it as unknown.
Notes
- Opt-in: pass
-a content-withfacts --trace, or setCILOCK_when cilock auto-detects attestors. Without a traced command-run, or without products, it recordsCONTENT_ FACTS complete:.false - It never fails the build. An error records
complete:with the reason.false - Cost: one read of each product and each expanded member, and one
bytes.per member per data file still unfound. Bounded at 2 GiB per product, 8 GiB expanded, 1 GiB per member, 64 GiB of total search work, 256 MiB of data files held for the search, and 512 MiB for a product plus the expanded buffers alive at once (Go may hold up to about twice that before a collection); over a bound the scan is incomplete.Contains
Gotchas
- A transformed copy (compressed by a format other than gzip, zip or tar, base64, re-encoded) is not found. xz, zstd, bzip2, 7z, lz4, lzma, lzop, compress, rpm, deb/ar, cpio, cab, xar, squashfs, rar and lzip products or members make the scan incomplete rather than claim absence.
- A product that changed after the product attestor hashed it, or a directory product, makes the scan incomplete.
- A
#!script that carries a compressed stream or a tar after its text (a self-extracting installer) makes the scan incomplete. An archive appended to or compressed inside a binary is not expanded: a compressed embed is the accepted residual. - A read file that changed after the trace hashed it gets no fact.
See also
This page is generated from the CI/lock tool catalog. Don't edit it here — the source is attestation/ in aflock-ai/rookery. The same catalog powers cilock tools show content- in the CLI, so a single edit keeps the terminal and the website in sync.
Edit this page → · Add a new tool →
When you open the pull request: if you are an AI agent, add the ai- label. If you are a human, add the human label.
Reference generated from the product documentation. Match commands and support details to your installed release.