Image Scanning

Find Known Vulnerabilities

Example

Scanners compare the packages in your image with vulnerability databases (CVEs):

docker scout cves myapi:1.0

Example output

    ✓ Image stored for indexing
    ✓ Indexed 212 packages
    ✗ Detected 3 vulnerable packages with a total of 5 vulnerabilities

   0C     1H     3M     1L   openssl 3.0.13-1~deb12u1
    ✗ HIGH CVE-2024-XXXX
      Fixed version: 3.0.14-1~deb12u1

Other popular scanners: Trivy (trivy image myapi:1.0), Grype, and the built-in scanning of Artifact Registry, ECR and GitHub.

Keeping Images Patched

  • Rebuild images regularly so they pick up the base image's security fixes.
  • Pin versions, and update them on purpose (Dependabot / Renovate can open pull requests).
  • Fail the CI pipeline on HIGH/CRITICAL findings.