Lesson 10 of 13 · 11m
Tags Lie; Digests and Signatures Don't
Mutable tags versus pinned digests, keyless cosign signing, admission-time verification, and registry allowlists.
A tag is a pointer, and pointers move
registry.example/app:1.4.2 does not name an image. It names a current association between a string and a digest, held by the registry and changeable by anyone with push rights — your CI, a compromised registry account, or the upstream project's own hijacked pipeline. The registry will happily repoint 1.4.2 at a backdoored layer set, and every kubectl rollout restart re-pulls whatever the tag says today.
The digest is the immutable name: registry.example/app@sha256:abc…. Pin it in manifests and the tag's mutability stops mattering — the pull either gets exactly those bytes or fails. See what actually ran:
kubectl get pods -A -o jsonpath='{range .items[*]}{.spec.containers[*].image}{"\n"}{end}'
kubectl describe pod web | grep -i imageidimageID shows the resolved digest — what the tag mapped to when it pulled.
Two caching wrinkles decide whether pinning helps: imagePullPolicy defaults to IfNotPresent for tagged images, so a node reuses its cached copy even after the tag repoints upstream (silent staleness), while Always re-pulls every start (fresh, but every pod start now depends on registry uptime and rate limits). The AlwaysPullImages admission plugin exists for the paranoid option. Note that pinning can itself be enforced — Kyverno images rules and admission policies can reject any pod spec carrying a bare tag instead of a digest, so "we pin digests" is a property of the cluster, not a habit of the deployers.
Signatures beat scanning
Image scanners answer "which known CVEs are in this image's packages." They cannot answer "is this the image my builder produced" — a typosquat (nginx-ingress-controler), a repushed tag, or a freshly backdoored base scans clean because the malice isn't a published CVE. Provenance is a different problem with a different tool: signatures.
Cosign (Sigstore) signs image digests. Keyless mode signs with a short-lived Fulcio certificate bound to an OIDC identity — GitHub Actions's OIDC token, your build system — and records the signature in Rekor's transparency log. The question it answers at admission time is exactly the right one: "was this digest signed by an identity I trust?"
Enforcement happens at admission:
- Kyverno
verifyImagesrules check cosign signatures (and attestations) before allowing a pod. - Sigstore policy-controller does the same as a validating webhook.
- Ratify + Gatekeeper verify signatures via the
external_datainterface.
Either way the pod spec carries a digest or tag and the cluster refuses it without a valid signature from your signer identity. Pair that with a registry allowlist — allowedRegistries/allowedImageRepos-style policy that refuses pulls from unapproved registries — and typosquats die at admission rather than at pager time.
Signatures also compose with attestations: cosign can sign an in-toto/SLSA provenance attestation — a signed statement of how the image was built (builder identity, source commit). Verifying provenance, not just the artifact signature, answers "was this built by my CI from my repo" — which a stolen-registry-credential push fails outright.
The evidence this isn't theoretical
JFrog's February 2024 Docker Hub analysis found millions of malicious repositories — roughly a fifth of all public repos — hosting phishing kits, malware droppers, and scam content in repository metadata and images. Docker Hub has repeatedly purged cryptominer images seeded under plausible names. None of that is exotic; it's what pulling an unverified public image at 3am can deploy.
What to actually do
Private registry as the only pull source (Harbor pull-through cache gives you availability plus scanning at the boundary), digest pinning on every deployment, cosign verification enforced at admission, and a registry allowlist so docker.io simply cannot be pulled. Scanners stay — for patch hygiene on what you did intend to run. Provenance is for proving it was what you intended.
Was this lesson helpful?
Keep reading
Related articles from the SudoSecurity blog.
A 257-Byte Password Is the Key: Inside the OpenSSH musl Bypass
CVE-2026-123158 lets an attacker log into a locked account on musl-based systems like Alpine by sending a password nobody set. The trigger is one number, 257, and the reason is a C library returning a single asterisk. I reproduced the exact boundary against musl 1.2.4 and read the fix.
Immich Had Fourteen Advisories and One Bug It Fixed Three Times
Immich's 2026 security record runs to fourteen advisories, and they cluster hard: the sharing features, the OAuth plumbing, and one login redirect parameter that took three separate fixes across eighty-three days. Plus the 3.0 migration traps still waiting for anyone who hasn't jumped yet.
Jellyfin's Threat Model Is Your Brother-in-Law
Four Jellyfin CVEs landed in 2026 and not one of them needs an admin account. One needs only the ability to name a file. Meanwhile Jellyfin 12 shipped in September, the version numbers stopped starting with 10, and every "am I patched" check you wrote is now wrong.
Node.js Fixed 16 Flaws in One Release. Most of Them Live in HTTP/2 and TLS.
The November 11 Node.js security releases fix 16 CVEs across the 26, 24 and 22 lines, seven of them rated high. Nearly all sit in HTTP/2 and TLS, where a remote client can crash a server, leak memory, or get past per-host client-certificate checks.