Why this matters
Tags can be retagged and drift over time. Digests lock the image content, preventing unexpected changes and reducing the blast radius of registry compromises.
Base images must be pinned to an exact version and content digest (@sha256) to guarantee reproducible builds and supply-chain integrity.
Tags can be retagged and drift over time. Digests lock the image content, preventing unexpected changes and reducing the blast radius of registry compromises.
Side-by-side examples engineers can pattern-match during review.
FROM node:20-alpine
# or
FROM ubuntu:22.04FROM node:20.11.1-alpine@sha256:3c8b...deadbeef
# Tag + digest; digest is the source of truthFROM nginx:latestFROM nginx:1.25.5@sha256:abcd...From the same buckets as this rule.