Skip to content

Provenance & Attestation (Theme) ​

A build system already knows the shape of what it did. Provenance is the separate act of writing that shape down as a claim someone else can check: which bytes came out, which inputs went in, which builder ran it, and who signs each answer. The catalog's systems split cleanly: one engine emits attestations as a product feature (BuildKit), one signs the objects it stores without describing the builds that made them (Nix), and the rest emit nothing at all.

Last reviewed: November 3, 2026

FieldValue
CategoryTheme — cross-cutting; no single system
QuestionWhat does a build claim about its own execution, who signs it, and what can a consumer check?
MechanismsDSSE envelope, in-toto Statement, SLSA provenance predicate, in-toto layout, OCI artifact attachment, store signatures
SystemsBuildKit, Bazel, Nix, REAPI backends, Buck2, Pants, Please, BitBake, and the rest of the catalog
Vocabularyconcepts — task, trace and shallow build are defined there; this page does not redefine them

NOTE

Scope is build provenance: claims produced by or about a build, plus the verification model that consumes them. Package-manager signing, SBOM formats and transparency logs appear only where a source in this corpus documents them. Statements that are analysis rather than quotation are marked catalog inference.

Overview ​

What it solves ​

Four questions get conflated and should not:

QuestionAnswering artifactWho can answer it
Are these the bytes I expected?digest, store-object hashanyone with the digest
What process produced them?.drv, provenance predicatethe builder
Who asserts that, and can I tell?DSSE signaturea key holder
Was that assertion acceptable?layout / SLSA expectationsthe consumer's policy

A build system can produce the middle two answers for free, and usually does not. ITE-6 gives the compact framing — an attestation is "authenticated metadata about software artifacts and the processes that generate them" (ite-6) — but SLSA is blunter about the last column: "provenance doesn't do anything unless somebody inspects it" (slsa-verify).

Design philosophy ​

Nix treats provenance as traceability inside one trust domain: the deriver table records which derivation produced an output, and the .drv graph is the explanation (nix-thesis §5). Its experimental build-trace design states the limit:

"In general, there is no way to audit a build trace entry except for by performing the build again from scratch. … the decision of whether to trust a counterparty's build trace is a fundamentally subject [sic] policy choice."

— Nix, build-trace.md

in-toto starts from the supply chain instead of the store, and says outright that it does not protect against "a functionary … who unwittingly introduces a vulnerability while following all steps of the supply chain as designed" (in-toto-spec §1.6).

Provenance is therefore not a correctness proof, not a reproducibility claim, and not a vulnerability scan — it is a signed statement about who ran what, useful exactly to the extent that the signer is trusted and the statement is complete.

How it works — the layer stack ​

LayerJobConcrete form
Envelopeauthenticate bytes and their typeDSSE Envelope, COSE, Sigstore bundle
Statementbind a claim to artifact digestshttps://in-toto.io/Statement/v1
Predicatesay what happenedhttps://slsa.dev/provenance/v1, link, SPDX, VSA
Chainsay what was supposed to happen, and by whomin-toto layout, SLSA expectations
Transportcarry the envelope beside or inside the outputOCI artifact, .intoto.jsonl, provenance.json

1. Envelope — DSSE signs a type and a body ​

DSSE signs a length-prefixed pair rather than canonicalised JSON:

text
PAE(type, body) = "DSSEv1" + SP + LEN(type) + SP + type + SP + LEN(body) + SP + body

payloadType is signed with the payload; KEYID is a hint that "MUST NOT be used for security decisions" (dsse-protocol).

"Implementations MUST ensure that the same SERIALIZED_BODY that is verified is the same sent to the application layer. In particular, implementations MUST NOT re-parse the envelope after verification to pull out the payload."

— DSSE protocol.md

2. Statement — ITE-6 splits claim from context ​

ITE-6 replaced the rigid link schema with four fields (ite-6), carried in a DSSE envelope (in-toto-envelope): _type, subject (name plus digests), predicateType, and an open predicate. The subject is the join key: "Subject artifacts are matched purely by digest" (in-toto-statement).

3. Predicate — the same event, two vocabularies ​

The link predicate is old in-toto link metadata in statement clothing: name, command, materials, byproducts, environment, with products moved into subject (in-toto-link). Its spec calls it a "generic attestation type" for which a "more specific predicate type such as Provenance" may be more appropriate.

SLSA provenance answers a platform-shaped question:

text
predicate.buildDefinition: buildType, externalParameters,
                           internalParameters, resolvedDependencies
predicate.runDetails:      builder.id, metadata, byproducts

externalParameters is "untrusted; they MUST be included in the provenance and MUST be verified downstream" (slsa-provenance). Version 1.0 also removed the two fields that answered the interesting question: metadata.completeness and metadata.reproducible are "Now implicit from builder.id" (slsa-provenance). Catalog inference: a builder-level identifier cannot express per-build nuance, which is why BuildKit reintroduces both as extension fields (buildkit-slsa-defs).

4. Chain — the layout is where policy lives ​

A single attestation says one step happened; the in-toto layout says which steps were required, who may perform them, and how many must agree:

"Supply chain layout: a signed file that dictates the series of steps that need to be carried out in the SSC to create a final product. … the list of actors (or functionaries) in charge of carrying out every step."

— in-toto specification, §1.7 in-toto-spec

SLSA replaces the layout with consumer-held expectations — builder identity, source repository, buildType, externalParameters. Catalog inference: a layout is a second graph, maintained beside the build DAG. The claim must travel with the artifact: a provenance.json file for BuildKit's local/tar exporters, or an OCI artifact whose subject points at the image manifest (buildkit-att-storage); a .intoto.jsonl bundle elsewhere (in-toto-bundle).

5. Levels — what SLSA actually grades ​

SLSA v1.0 is retired; v1.2 keeps the build track and adds a Source track (slsa-home, slsa-levels). L0 is the absence of SLSA:

LevelRequirementWhat it stops
L1provenance exists, from a consistent processmistakes; trivially forgeable
L2hosted platform generates and signs provenancetampering after the build
L3hardened platform: isolation, key inaccessibletampering during the build

Two limits are stated, not inferred: at L1 "provenance may be incomplete and/or unsigned", and L3 "does not cover compromise of the build platform itself, such as by a malicious insider" (slsa-levels, slsa-verify).

What the catalog's systems actually emit ​

SystemEmitsSigned byNotes
BuildKitin-toto + SLSA v0.2/v1, SBOMsnobody, by BuildKitopt-in attest:provenance; mode is min or max
Bazelnothing on the action path—BEP is telemetry; BCR plans SLSA verification
Nix.drv + deriver; narinfo signaturescache operator's Ed25519 keysignature covers the path, not its derivation
Nix (experimental)signed build-trace entries, signed realisationsbuilder keybehind ca-derivations
Buck2nothing—provenance means config origin
REAPI backendsExecutedActionMetadata (worker, timestamps)—plain protobuf, no signature field
BitBakenothing—sstate hash explains why it was trusted
Pants, Pleasenothing—no attestation code in their trees
sbtcache-origin telemetry—ActionResult.origin names the store
Earthlynothing of its own—BuildKit frontend; no attestation in its tree
build2, GN, Mesonnothing—no action keys to attest
Sparklesnothing—TaskId text identity only

BuildKit: provenance as a product feature ​

BuildKit is the only engine here whose documentation is written around attestation output. attest:provenance is a build option; the record includes "Build dependencies with their immutable checksums" and per-step source and layer mappings (buildkit-slsa).

Completeness is a dial. mode=min omits build-argument values, secret identities and rich layer metadata; mode=max includes them — "the values of various build arguments and metadata about secrets" (buildkit-slsa). Hermeticity is a syntactic predicate: buildkit_hermetic is true when a Dockerfile "does not use RUN commands or disables network with --network=none" (buildkit-slsa-defs) — the declared-not-observed hermeticity buildkit §5 describes. Catalog inference: BuildKit generates the claim; it does not vouch for it. Nothing in docs/attestations/ describes signing the envelope; the one signing hook in buildkitd.toml.md is for cache payloads (buildkit-toml).

Bazel, REAPI: telemetry that resembles provenance ​

Bazel emits no provenance for its actions; the Build Event Protocol is "an observability stream, not a signed claim about who ran what" (bazel §5). Its one SLSA mention is forward-looking and about dependencies: "The Bazel Central Registry will also support verifying SLSA attestations" (bazel-roadmap). Remote execution does record who ran an action — ExecutedActionMetadata starts with "the name of the worker which ran the execution" (reapi) — but the message has no signature field. Catalog inference: schedulers already hold the worker, the timestamps and the action digest; no REAPI implementation here turns that into a signed claim.

Nix: sign the object, not the build ​

Nix's shipped mechanism is a substitution-integrity signature. nix store sign signs a fingerprint of exactly four things:

text
1;<store path>;<nar hash>;<nar size>;<sorted references>

(path-info.cc). The deriver field is not in it, so a signature proves "this path has these bytes and these references", not "this derivation produced it". nix store verify --sigs-needed n requires threshold agreement (verify.cc), and the same machinery signs CA-derivation realisations, where the store refuses one that "lacks a signature by a trusted key" (local-store.cc). A richer design — a signed memo table mapping resolved derivations to outputs — is documented and experimental (nix-build-trace). Catalog inference: Nix can prove what a store object is, but the shipped record of how it was made is an unsigned .drv link plus a deriver column.

Upstream's build-trace design draws a distinction provenance systems often blur: coherence is not truth. A base build trace whose keys are resolved derivations is trivially coherent because entries are independent claims; whether an entry faithfully records a build is a separate policy question, and in general it can only be audited by rebuilding. Derived traces (unresolved-derivation keys) are different: they are caches over a fixed base trace and become incoherent if entries derived under two different base mappings are combined without their underlying entries (nix-build-trace). Signing trace entries therefore provides accountability for who claims a mapping, not evidence that the mapping is reproducible. A verifier that wants truth rather than mere non-contradiction still needs a rebuild or a trusted builder boundary.

Correctness risks ​

  • A signature authenticates the claim, not its truth. BuildKit records VCS metadata the client supplies: "contrary to the …configSource field, BuildKit doesn't verify the vcs values, and as such they can't be trusted" (buildkit-slsa-defs). Nix says the same about whole build traces (nix-build-trace).
  • Completeness is best effort, and the dial can hide the interesting part.mode=min drops arguments and secret identities (buildkit-slsa), and buildkit_completeness is self-declared (buildkit-slsa-defs).
  • The signed predicate and the signed object can diverge. Nix's fingerprint excludes deriver (nix-fingerprint); in-toto "does not record or verify any accompanying artifact metadata such as file permissions and timestamps" (in-toto-spec). Catalog inference: neither says "this object came from that derivation, which ran on that worker" in one signed sentence.
  • A bundle is not authenticated as a whole. "An attacker might be able to delete valid attestations, replay obsolete attestations, and/or inject invalid or irrelevant attestations in a Bundle without being detected" (in-toto-bundle).
  • Subject matching is digest-only (in-toto-statement) and policy is per package while provenance is per artifact: "Expectations are tied to a package name, whereas provenance is tied to an artifact" (slsa-verify).
  • Signing is a key-custody problem before it is a performance problem. L3 requires that "secret material used to sign the provenance" be inaccessible to user-defined build steps (slsa-levels); no source opened publishes a signing-latency or attestation-overhead measurement, so this page makes no performance claim (sandboxing-overheads covers the isolation cost).
  • Provenance is one more graph to keep consistent. If action keys are shallow (a hash passthrough — concepts §8.4), a record derived from them inherits the shallowness. Catalog inference: record terminal inputs in resolvedDependencies, not the cache keys standing in for them.

Strengths ​

  • The layer split is the achievement. DSSE, Statement and predicate are independently replaceable, so one SLSA predicate can be emitted by BuildKit, stored by a registry, and re-checked by a consumer's verifier.
  • The cheapest useful thing is a link predicate. command + materials + subject is what a build engine already holds; emitting it is bookkeeping.

Weaknesses ​

  • The expensive thing is trust. Keys, hosted platforms, tenant isolation and expectation maps all live outside the build graph (ite-6, [slsa-threats]).
  • The most complete record is still not checked. Nix calls its derivation graph traceability (nix-thesis §5); BuildKit records "what was requested, not that the result is reproducible" (buildkit).

Key design decisions and trade-offs ​

DecisionRationaleTrade-off
Sign a DSSE PAE, not canonicalised JSONNo canonicalisation library to get wrongPayload type must be carried and signed; KEYID is a hint only
Split Statement from predicate (ITE-6)Any claim type, one framing; SLSA and SPDX share an envelopeConsumers must parse predicateType; parsing is attack surface
Grade builders, not buildsA level is a platform property, checkable oncePer-build nuance becomes vendor extension fields
Attach attestations to the artifact (OCI)They travel with what they describeNeeds registry support; the envelope is not in the digest

Sparkles relevance ​

sparkles.build_primitives.task is a static task DAG with a stable text identity and no store. TaskId "never contains a memory address, random number, temporary path, or discovery index" (libs/build-primitives/src/sparkles/build_primitives/task/model.d), and toHash hashes that text rather than any input — the starting point reproducibility describes from the caching side.

What exists is raw material for a link-shaped attestation, and almost nothing for a SLSA-shaped one:

  • TaskNode carries id, kind, action, resources and policies; TaskEdge carries prerequisite, dependent, condition and reason (libs/build-primitives/src/sparkles/build_primitives/task/model.d). Edges are ordering constraints with a reason, not data flow — byproducts, not resolvedDependencies.
  • ProcessAction holds argv, an envDelta whose entries can be marked redacted, a cwd, a timeout and a SandboxPolicy (libs/build-primitives/src/sparkles/build_primitives/task/action.d). argv is predicate.command; envDelta is internalParameters; redacted is already the mode=min policy — a secret never written to a log must not reach an attestation.
  • TaskEvent / TaskOutput / TaskFinished are a live telemetry stream: BEP-shaped, useful to a reporter, meaningless as a claim until something signs them and names the executor as builder.id.

Three mechanics port now, in increasing cost:

  1. Emit a link predicate per task, not SLSA provenance. name = TaskId, command = ProcessAction.argv, materials = the declared inputs, subject = the outputs, byproducts = the events — a serializer over existing data.
  2. Put the envelope beside the artifact, never inside the key.content-addressing states the rule for digests — "record context beside the digest, never inside it" — and provenance is context.
  3. Refuse to claim a level. Sparkles' tasks see the ambient environment, the dub cache and the Nix store; until that perimeter is stated, "SLSA L2" is marketing. The honest order is an unsigned Statement, then a subject-digest check, then a key, then isolation — SLSA's own order.

Sources ​

In-corpus pages synthesized: concepts (§7 lists provenance as out of the paper's scope; §8.4 shallow-build hash passthrough), buildkit (§5, the provenance trade-off), bazel (§5), nix-thesis (§5), nix-dynamic-derivations (§5), bitbake (§5), reproducibility, content-addressing, sandboxing-overheads; absence checked, no claim drawn, in Buck2, Pants, Please, Earthly, Moon, build2, GN, Meson and sbt. Primary sources, opened at pinned revisions:

Unverified: no source opened publishes a signing-latency or attestation-size measurement, or traces a shipped in-toto layout; the layout material above is the specification's model, not an observed deployment.