Interview Prep/DevSecOps/Supply Chain Security

How do you attach scan and test results to an image so later stages can verify them?

IntermediateScenarioSupply Chain Security
Answer

Situation read → Evidence should travel with the artifact and be verifiable, so deploy-time policy can use it.

What I'd do →

  1. Produce the result predicate: trivy image --format cosign-vuln -o vuln.json app@sha256:....
  2. Attach it: cosign attest --yes --predicate vuln.json --type vuln app@sha256:....
  3. At admission, Kyverno attestations condition checks the attestation was signed by CI and has no critical findings.
  4. Do the same for SBOM and provenance.

Why → Policy can say "only images with a recent passing scan from our pipeline may run".

Interview tip → Attestations are in-toto statements signed with the same identity.

All DevSecOps questions Roadmap: Supply chain, secrets & identity

More on Supply Chain Security