Pcornel
Containers · Images & Registries

Image Vulnerability Scanning and Signing

Cheat sheet · https://pcornel.dk/topic.php?topic=6126

Back to the Topic

Answer

Image vulnerability scanning finds known CVEs in OS packages and libraries (Trivy, Grype, registry scanners); signing (Sigstore cosign, Notation) proves who built an image so admission can verify it.

Remember

Scan in CI and on a schedule — new CVEs appear for old images. Fix by updating the base image and rebuilding. Enforce signatures with an admission controller (Kyverno, Gatekeeper, Connaisseur).

First checks

  • trivy image <img> — vulnerability scan
  • docker ps -a — containers and exit codes
  • docker logs <c> — container output
  • docker inspect <c> — config, mounts, network, state

Verify in this order

build → scan → sign → push → admission verifies → run

Where it usually breaks

Scanning only at build time misses vulnerabilities published later.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=6126

Confirmation

Confirm action

Continue?