Interview Prep/DevSecOps/Supply Chain Security at Scale

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.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply Chain Security at Scale