Join our Discord Server

Docker Scout Cheatsheet

← All cheatsheets
SecurityIntermediate

Docker Scout Cheatsheet

Analyze images for CVEs, generate SBOMs, and enforce supply-chain policy.


What it is

Docker Scout is a supply-chain security tool that scans images for vulnerabilities, produces SBOMs, and lets you set policy gates in CI/CD pipelines.

Installation

Bundled with Docker Desktop. Install the standalone CLI with docker scout install or download from the Docker Scout documentation.

Quick start

docker scout quickview nginx:alpine

Get a fast CVE summary for an image.

docker scout cves nginx:alpine

List all known CVEs in the image.

docker scout sbom nginx:alpine

Generate a Software Bill of Materials (SBOM).

docker scout recommendations nginx:alpine

Get upgrade recommendations to fix vulnerabilities.

Common commands

TaskCommandDescription
Quick CVE summarydocker scout quickview <image>High-level vulnerability overview.
List CVEsdocker scout cves <image>Detailed CVE list with severity.
Generate SBOMdocker scout sbom <image>Full Software Bill of Materials.
Get recommendationsdocker scout recommendations <image>Suggests base image upgrades to reduce CVEs.
Compare imagesdocker scout compare <img1> --to <img2>Diff CVEs between two image versions.
Enroll imagedocker scout enroll <org>Enable Scout for an org on Docker Hub.
Push with attestationsdocker buildx build --provenance --sbom -t me/app --push .Attach provenance & SBOM at build time.

Useful flags

FlagExampleMeaning
--only-severitiesdocker scout cves --only-severities critical,high nginxFilter by severity level.
--formatdocker scout sbom --format spdx nginxOutput format (spdx, cyclonedx, etc.).
--exit-codedocker scout cves --exit-code nginxReturn non-zero exit if CVEs found (CI gating).
--platformdocker scout cves --platform linux/amd64 nginxScan a specific platform variant.

Real-world examples

Fail CI if critical CVEs found
docker scout cves --exit-code --only-severities critical my-app:latest
Export SBOM as CycloneDX JSON
docker scout sbom --format cyclonedx my-app:latest > sbom.json
Compare current vs previous release
docker scout compare my-app:v2.0 --to my-app:v1.9

Best practices

  • Integrate docker scout cves --exit-code into CI to gate deployments on critical CVEs.
  • Attach SBOMs at build time with --sbom=true for supply-chain transparency.
  • Run docker scout recommendations before each release to minimize attack surface.
  • Use distroless or alpine base images to reduce the number of packages and CVEs.

Troubleshooting

Scout not found or not enabled

Install or enable the Scout plugin.

docker scout install
Image not indexed

Push the image to Docker Hub to trigger indexing, or use a local image directly.


Related cheatsheets


Last reviewed: 2026-06-15
Join our Discord Server