The SolarWinds attack in 2020, the Codecov breach in 2021, and the XZ Utils backdoor in 2024 established software supply chain compromise as the dominant threat model for production infrastructure — not the runtime exploit of a running service but the injection of malicious code into the build and distribution pipeline that produces the software before it reaches production. Container images are a particularly attractive target because a single compromised base image or build tool can propagate the malicious payload to hundreds of downstream consumers through the registry pull mechanism, without any of those consumers making any change to their own code. Supply chain security for containers therefore requires answering three questions that vulnerability scanning alone cannot answer: who built this image, from which source code, using which build environment, and has any of that changed between what was tested and what was deployed? Cosign, the SLSA framework, and in-toto attestations are the three tools that provide cryptographic, auditable answers to these questions.
The key insight that distinguishes supply chain security from vulnerability scanning is the direction of trust. Vulnerability scanning asks 'does this artifact contain known bad components?' — a question that depends on the accuracy of the vulnerability database and the completeness of the SBOM. Supply chain security asks 'can I verify that this artifact was produced by the process I trust, from the source I control, without modification?' — a question that depends on cryptographic proof rather than database coverage. These two questions are complementary: a clean Trivy scan on a compromised image provides false assurance if the scanner itself was not running against the actual deployed bytes, while a verified Cosign signature on a malware-infected image proves provenance but does not indicate safety. A complete supply chain security posture requires both.