How do you implement a policy that only images with zero critical vulnerabilities at build time can be deployed?
IntermediateProductionSupply Chain Security at Scale
Answer
Attach the scan result as a signed attestation in CI, then verify it at admission.
trivy image --format cosign-vuln --output vuln.json ghcr.io/acme/api@sha256:abc...
cosign attest --yes --type vuln --predicate vuln.json ghcr.io/acme/api@sha256:abc...
Kyverno's verifyImages.attestations with conditions can then check the predicate (e.g. no entries with severity CRITICAL) and freshness of the scan timestamp. Pair it with continuous re-scanning, because "zero criticals at build" decays over time.
More on Supply Chain Security at Scale
How do you design an end-to-end supply-chain security architecture for 200 services?AdvancedWhat does it take to reach SLSA Build Level 3 in practice?AdvancedHow do you use GitHub artifact attestations for build provenance, and how do consumers verify them?IntermediateWhere and how do you store SBOMs at scale?IntermediateWhat does "sign everything" mean in a mature supply chain?IntermediateHow do you write an admission policy that verifies both the signer identity and an SBOM attestation?Advanced