Skip to content

Provenance

A capsule's provenance traces it back, digest by digest, to the files and declarations it was built from. Every link is a digest, so each step can be checked by recomputing it, and a capsule that differs from its record anywhere along the chain is refused.

flowchart TB
  M["Capsule manifest<br/>immutable file tree, provenance"]
  M -->|"build_input_digest"| B["Capsule build input<br/>seed, source and generated file digests"]
  B -->|"interface seed"| S["Interface seed<br/>compiled interface, XCI source digest"]
  S -->|"source digest"| X["XCI source file"]
  B -->|"package_archive_digest"| A["Package archive"]

The immutable file tree

The manifest's immutable_file_tree lists every file in the block folder with its SHA-256:

"immutable_file_tree": {
  "billing.py": "ec2504a0…",
  "billing.xci.json": "ab5db03a…",
  "capsule/acme/billing/ledger_adapter_dispatch.py": "20f83de2…"
}

This is the exact set of files the capsule may use. A node checks the files it opens against these digests, and the control plane's publication attestation signs a digest of the whole tree.

The provenance record

"provenance": {
  "build_input_digest": "sha256:142404dd1aaf489a69294c8366239fa69a79814069b862eba5a158fc8b0e5fcd",
  "produced_by": "bake",
  "seeded_by": "reusable_capability_block_generation"
}
  1. build_input_digest points to the capsule build input, which records every input bake used. See Capsule build input.
  2. produced_by and seeded_by name the two stages that made the capsule: generation produced the seed, and bake built the capsule from it.

The manifest points to the build input by digest and keeps one description of the build. The attestation signs a digest of the provenance record too, so the chain is covered by the signature. See Immutable runtime artifacts.