Chapter 25Lesson 04~185 minutes

Artifact Attestations, SBOMs, Build Provenance, Verification, and SLSA-Oriented Workflows: Diagnostics, Failure Modes, Security, and Performance

Supply-chain evidence can be cryptographically valid and still fail policy. This lesson diagnoses wrong-builder trust, changed artifact bytes, source-derived SBOMs that do not represent shipped contents, verification that is never enforced, and overstated SLSA claims. The repair sequence keeps the original failure visible and changes the smallest causal boundary.

DiagnosticsSubstitutionSBOM driftPolicySLSA claims

Learning objectives

  • Diagnose a cryptographically valid attestation that fails the organization’s builder/ref policy.
  • Interpret digest mismatch/no-matching-attestation failures without hiding the changed artifact bytes that caused them.
  • Detect an SBOM that was generated from the wrong lifecycle point and therefore misses shipped components.
  • Repair verification coverage so evidence is consumed at the trust boundary rather than merely generated and forgotten.
  • Challenge overstated SLSA claims with versioned requirements and documented build-platform assumptions.
Diagnostic sequence: preserve artifact + digest + attestation/verification output → identify repository/ref/workflow/run/package/deployment scope → inspect authenticated certificate/timestamps and statement subject/predicate → compare policy → correct the smallest causal boundary → verify again. Do not “fix” evidence by deleting the failing artifact or relaxing trust constraints until the cause is understood.

1. Failure: signature valid, builder policy wrong

Imagine artifact.tar has a valid GitHub attestation from acme/scratch-builds, but production policy allows only acme/release-platform/.github/workflows/release.yml. A verifier that checks only --owner acme may accept an identity that is cryptographically genuine but operationally unauthorized.

# Too broad for production if many repositories may sign.
gh attestation verify artifact.tar --owner acme

# Stronger: require the expected repository and signer workflow.
gh attestation verify artifact.tar   --repo acme/widget   --signer-workflow acme/release-platform/.github/workflows/release.yml   --source-ref refs/heads/main

Preserve both outputs. The first demonstrates why cryptographic validity alone is not sufficient; the second demonstrates the intended authorization policy. If the stronger check fails, do not weaken it reflexively—determine whether the artifact is wrong or the documented policy is stale.

2. Intentionally broken example: artifact bytes changed after attestation

Start from a copy of the verified Lesson 2 artifact so the original evidence remains intact. Append one byte to the copy and rerun verification. This is non-destructive to the original but creates a real substitution failure.

cp atlas-lab.tar atlas-lab-tampered.tar
printf 'X' >> atlas-lab-tampered.tar

printf 'original: '
sha256sum atlas-lab.tar
printf 'tampered: '
sha256sum atlas-lab-tampered.tar

set +e
gh attestation verify atlas-lab-tampered.tar   -R "$REPO"   --signer-workflow "$REPO/.github/workflows/ch25-attest.yml"   2>tampered.verify.stderr
STATUS=$?
set -e

cat tampered.verify.stderr
printf 'verification_exit=%s
' "$STATUS"
test "$STATUS" -ne 0

Expected interpretation: the tampered file computes a different subject digest, so the verifier cannot validate it against the attestation issued for the original bytes. Repair means restore/re-download the known artifact and verify again—not create a new attestation for unexplained bytes.

3. Failure: SBOM was generated from source, not shipped reality

A common pipeline generates an SBOM immediately after dependency resolution, then a later packaging stage vendors a native library or downloads a runtime asset. The SBOM can be correctly attested yet incomplete because the claim itself does not describe final contents. Cryptography protects the claim’s provenance; it does not infer missing components.

Evidence Diagnostic question Repair
SBOM creation step Did it inspect final artifact/image or only source manifests? Move inventory after final resolution/package step or use an artifact/image scanner.
Artifact digest Is SBOM attestation subject the shipped digest? Regenerate/attest against exact final subject.
Resolved dependencies Are lockfile/vendor/generated/runtime layers represented? Choose generator/config appropriate to ecosystem and delivery unit.
Consumer incident query Can vulnerable component map to released subjects? Retain SBOMs + provenance keyed by immutable digest.

4. Failure: attestations exist, nobody verifies them

A team celebrates that every release run produces attestations, but the deployment script continues to run curl ... && deploy without gh attestation verify or equivalent policy. This adds storage and dashboards, not a security boundary. GitHub’s own documentation explicitly states that generating attestations alone does not provide the security benefit; consumers must verify.

# Weak deployment outline: presence is assumed.
# download artifact
# deploy artifact

# Governed outline:
# download artifact
# compute/record digest
# verify attestation + expected signer/source policy
# verify required SBOM predicate if policy needs it
# deploy only on success

5. Failure: “we use GitHub attestations, therefore we are SLSA L3”

GitHub currently states that artifact attestations by themselves provide SLSA v1.0 Build Level 2 and that a vetted reusable-workflow design can help achieve v1 Build Level 3. The current SLSA specification is v1.2. A team that claims “SLSA L3” merely because it uses actions/attest has skipped the architectural requirements around build platform, isolation, producer process and verification.

Repair the claim: document the SLSA version and Build track, identify which requirements are supplied by GitHub-hosted build infrastructure versus your reusable workflow/governance, show consumer verification policy, and keep gaps explicit. Avoid marketing shorthand that outruns evidence.

6. Failure: policy overlooks runner trust

An attestation may identify a valid workflow that ran on self-hosted infrastructure. If your threat model requires GitHub-hosted isolation, that difference is causal. Current GitHub CLI exposes --deny-self-hosted-runners so a deployment policy can reject attestations generated on self-hosted runners.

gh attestation verify artifact.tar   --repo acme/widget   --signer-workflow acme/widget/.github/workflows/release.yml   --deny-self-hosted-runners

Do not interpret this as “self-hosted runners are always insecure.” Chapter 16 established that self-hosted runners are a separate trust zone whose patching, network reach, persistence and isolation are operator responsibilities. The verifier flag is appropriate only when the consumer policy intentionally excludes that trust zone.

7. Failure: REST bundle presence is treated as verification

# Discovery/inventory only:
gh api -H "X-GitHub-Api-Version: 2026-03-10"   "repos/acme/widget/attestations/sha256:EXAMPLE_DIGEST"

# Acceptance requires cryptographic + identity verification:
gh attestation verify artifact.tar --repo acme/widget   --signer-workflow acme/widget/.github/workflows/release.yml

The REST documentation itself warns that an attestation’s signature/timestamps and signer identity must be cryptographically verified for meaningful security. Use REST to find evidence and CLI/library verification to decide trust.

8. Reliability and performance where they are causal

Verification adds network/API/registry dependency and cryptographic work. For individual release artifacts this is usually small, but high-volume deployments should cache/download attestation bundles deliberately, handle API pagination/rate limits, and design offline verification for air-gapped environments. Do not skip verification merely because the network is unavailable; define a trusted offline-bundle/trusted-root procedure or fail closed according to deployment criticality.

For OCI images, fetching image and attestation bundles may involve registry authentication. Do not log registry credentials or attestations containing confidential predicate data. Public attestations and transparency-log data should be treated as intentionally public evidence.

9. Evidence-first diagnostic runbook

Step Evidence to preserve Least-destructive correction
Preserve Artifact bytes, digest, verifier stdout/stderr/exit code, workflow run ID/head SHA Copy to incident workspace; do not overwrite original.
Scope Repository, source ref/digest, signer workflow/repo, predicate types, runner class Clarify which trust boundary failed.
Inspect Certificate/timestamps, statement subject/predicate, REST bundle metadata, SBOM generation stage Compare authenticated identity separately from workflow-controlled predicate fields.
Correct Wrong artifact, wrong policy, wrong builder, wrong SBOM lifecycle point Fix the causal object; do not blanket-relax verification.
Verify Repeat exact consumer gate and compare result Record pass/fail plus accepted subject digest.

Knowledge check

Why can an attestation be cryptographically valid yet rejected by policy?

What should you do when the artifact digest changes after attestation?

Can signing an SBOM make an incomplete SBOM complete?

Why is “attestation exists” weaker than “deployment verifies attestation”?

What is wrong with claiming SLSA L3 only because actions/attest is present?

Summary

Most attestation failures are policy/data-lifecycle failures, not broken cryptography. Preserve the exact subject and verifier output, distinguish authenticated certificate identity from workflow-controlled predicate content, fix wrong bytes/builders/SBOM stages rather than weakening checks, and state SLSA claims no stronger than the evaluated evidence. The checkpoint now turns those lessons into one end-to-end consumer gate.

Next lesson

Checkpoint Lab — Artifact Attestations, SBOMs, Build Provenance, Verification, and SLSA-Oriented Workflows

Official references

Keep the academy open

Support free, practical DevOps education.

Every lesson is designed to remain readable in a browser, downloadable from GitHub, and usable without a paid learning platform. Contributions help expand and maintain the curriculum.

Ethereum / ERC-20
0x716c4Ab160C4B66F31a28AE2448BfF68fc3a2ef0 Send only Ethereum/ERC-20 compatible assets to this address.