6  Recipe: verify a release artefact end to end (checksums, attestations, tag)

Field Value
Tools sha256sum + gh attestation + git (release surfaces)
Section Getting started
Level medium
Time ~15 min per artefact (+ download time)
Layer/Category CLASSIC (release engineering)
Tags getting-started, verification, supply-chain, slsa, spdx

6.1 Problem

A download is done, or one is next. “It booted” is not evidence that the bytes match the project build. The release ships a trust chain. The chain holds only when the checks actually run. The chain carries a checksum sheet as the identity authority. It carries SLSA build provenance + an SPDX SBOM per artefact. It ends at a GPG-signed release tag. This recipe runs the whole chain by hand. The awkward case is in scope too: an artefact above GitHub’s per-file cap arrives as split parts.

6.2 Solution

The chain has four links. Run them in order. A failed link means the download does not run.

# 0. Name the tag + artefact you are working with, from the release's
#    own asset table (e.g. the first staged cut):
#      tag      = 2026.01-alpha.1
#      artefact = kailash-2026.01-alpha.1-kailash-iso-redteam-ai.iso
#    Over-cap artefacts (every qcow2, iso-full) ship CHUNKED instead of
#    attached: <name>.part-000 (each ≤1900 MiB) + SHA256SUMS-parts-<name>.

# 1. LINK 1 — per-part digests (chunked artefacts only)
sha256sum -c SHA256SUMS-parts-kailash-2026.01-alpha.1-kailash-qemu-full.qcow2

# 2. Reassemble — byte-exact by construction, verify the ORDER-safety
#    claim yourself (parts are named sequentially on purpose):
cat kailash-2026.01-alpha.1-kailash-qemu-full.qcow2.part-* > \
    kailash-2026.01-alpha.1-kailash-qemu-full.qcow2

#    (tools/split-release-artefact.sh verify <artefact> <dir> drives
#     this whole chunk stage as one command)

# 3. LINK 2 — the whole-file identity check
sha256sum -c SHA256SUMS

# 4. LINK 3 — build provenance + SBOM, Sigstore over the repo's OIDC
#    identity
gh attestation verify kailash-2026.01-alpha.1-kailash-qemu-full.qcow2 \
    -R kailash-os/kailash-os

#    (SLSA v1.0 provenance + SPDX SBOM per artefact — KA-48)

# 5. LINK 4 — the signed tag the artefacts were built from
git clone --branch 2026.01-alpha.1 --depth 50 \
      https://github.com/kailash-os/kailash-os.git
git tag -v 2026.01-alpha.1

What success looks like:

  • the per-part sheet check reports OK for every .part-* line
  • a truncated part fails the check, before the large reassembly
  • cat …part-* > reproduces the file
  • the whole-file sha256sum -c against SHA256SUMS reports OK for the artefact’s line — the release sheet, THE authority on artefact identity
  • gh attestation verify PASSES and names the build provenance predicate. The check binds the digest to the ORIGINAL build’s records. It stays valid after reassembly (the split is lossless packaging; cat reproduces the attested subject’s exact bytes)
  • git tag -v shows a good GPG signature (the release notes name the signing key). The signature covers the tag whose lock bump the artefacts were built at

Expected output shape (abridged, per link):

kailash-<…>.part-000: OK
...
<artefact>: OK                                       <- whole-file SHA256SUMS line
Verified signature by a trusted GitHub artifact attestation service. <- (shape)
Good "git" signature (GPG) for <key-id>               <- (shape)

6.3 Discussion

  • Why three digests, not one: the per-part sheet authenticates each chunk in transit. A corrupt part fails before any reassembly work. The whole-file line in SHA256SUMS is the identity statement: what the releaser built. The attestation binds BOTH to the build event: which workflow built it, under which repo identity. The SLSA/Sigstore layer answers the question checksums cannot: not byte consistency, but build origin.
  • The SBOM shares the attestation: every published artefact carries an SPDX SBOM as a separate statement. A supply-chain audit or an AI-BOM flow starts from it. Keep the verified artefact and its attestation together in the engagement records.
  • Chunked ≠ suspicious: the cap (2 147 483 648 bytes per upload) is a GitHub endpoint limit, not a project hedge. The split tool’s contract is byte-exact reassembly. Its self-test deliberately crosses parts to prove reassembly ORDER. The completeness gate (images-release-completeness in the OS repo) fails CI if a matrix row lacks its declared build surface. Chunked publishing keeps every artefact ON the release.
  • The flake-pull alternative: any artefact, any tag, can come from the Cachix-held closure instead — nix build github:kailash-os/kailash-os/<tag>#<ref> — the nix fetch and the lock carry the verification instead. The SAME SHA256SUMS line still pins whole-file identity after the build. The release notes’ artefact table states each artefact’s surface.
  • The tag is the frame: every other link verifies an artefact, the tag verifies the release state. The staged ladder (-alpha.N → -rc.N → bare YYYY.NN) is visible in the tag name. Its lock bump PR is the release review. A rebuild instead of a download is an equally valid path for a suspicious link. Build from this tag, not from a moving master.
  • Where a mismatch lands: a failing link is either transport corruption or a genuinely wrong artefact. Fix the first case with a re-download; the sheets re-check in seconds. Report the second case on the OS repo’s tracker with the release tag. The troubleshooting chapter’s first move is the same checksum the run just used.

6.4 See also


Recipe provenance. Chain surfaces — SHA256SUMS + per-part SHA256SUMS-parts-<name> sheets, .part-* naming with ≤1900 MiB parts, the reassembly and identity-check order, gh attestation verify <file> -R kailash-os/kailash-os, git tag -v, SLSA v1.0 + SPDX per artefact, the nix build github:…/<tag>#<ref> alternative — are from the OS repo’s images chapter + tools/split-release-artefact.sh (KA-33.4) + the release notes of 2026.01-alpha.1 (attestation evidence recorded on the cut issue), verified 2026-10-14 at master/the published release. Verbatim verify-output transcripts: PENDING (follow-up: the upkeep lane kailash-book#12) — every rendered line above is a shape with placeholders, per the book’s no-invented-evidence rule.