Lesson 1 of 9 · 24m
Artifact Identity and Signing: Knowing What You Actually Shipped
Build the mental model of digest-addressed artifacts, signatures, trust roots, and verification at deploy time.
The first supply-chain incident I helped untangle had a simple problem: nobody could prove which binary ran in production. The file was called app-release-final.jar, rebuilt twice, copied through a shared bucket, and deployed by hand. The attacker did not need a sophisticated exploit. They only needed ambiguity.
A release is evidence, not a file name
The core question is not "do we trust this server?" It is "can this exact artifact be traced to an approved build?" Names, timestamps, and bucket paths are weak evidence. Cryptographic digests are strong evidence:
sha256sum dist/payments-api_linux_amd64.tar.gz
# 3b8f4e4d... dist/payments-api_linux_amd64.tar.gzUse the digest as the artifact identity everywhere: release notes, deployment manifests, tickets, and rollback instructions. A filename is a label. A digest is a fact.
Signing binds identity to bytes
A signature says: a keyholder you chose to trust approved these exact bytes. With cosign, the keyless flow uses an identity from your OIDC provider and records evidence in a transparency log:
cosign sign --yes ghcr.io/acme/payments-api@sha256:3b8f4e4d...
cosign verify ghcr.io/acme/payments-api@sha256:3b8f4e4d... --certificate-identity-regexp 'https://github.com/acme/payments-api/.github/workflows/release.yml@refs/tags/v.*' --certificate-oidc-issuer https://token.actions.githubusercontent.comThe verification command is the important part. Signing without enforced verification is decorative cryptography.
Prefer immutable references at deployment
Deploy by digest rather than mutable tag:
containers:
- name: payments-api
image: ghcr.io/acme/payments-api@sha256:3b8f4e4d...Tags move. Digests do not. Keep tags for humans, but make machines consume immutable references. This also prevents a quiet rollback when someone republishes v2.4.1 with different content.
Understand the trust boundary
Signing protects bytes after signing; it does not prove the source was honest, the build was clean, or the keyholder behaved correctly. It answers one narrow question well: did the expected identity approve this exact artifact? Provenance, reproducibility, dependency controls, and registry policy answer the neighboring questions.
Verify close to execution
The best place to reject an unsigned artifact is immediately before it can run. In Kubernetes, admission controllers can verify signatures before a pod starts. In a simpler estate, a deploy wrapper can verify the artifact before copying it. Verification in a weekly report is governance; verification in the execution path is control.
Field notes
- Signing a compressed archive and signing the uncompressed binary are different facts; verify whichever object you actually distribute.
- Never let CI print private key material while debugging signature failures.
- Keyless signing still has a trust root: the OIDC issuer, identity pattern, and transparency log.
- A digest mismatch means stop. Do not "retry download" until you know whether you fetched corruption or interference.
- Keep verification independent from the artifact producer where possible; otherwise one compromised pipeline can sign and approve itself.
Was this lesson helpful?