Docker "docker scout: failed to analyze" in CI
docker scout pulls or reads an image, generates an SBOM, and matches it against advisories. It fails to analyze when the image reference cannot be resolved, the run is not authenticated to Scout or the registry, or the SBOM cannot be produced for the image format.
What this error means
A docker scout cves / docker scout quickview step fails with failed to analyze image. The image could not be resolved or the SBOM step failed.
docker scout cves ghcr.io/myorg/api:1.4.2
ERROR: failed to analyze image: failed to create source: no image found for referenceCommon causes
The image reference is not available
Scout cannot analyze an image that was not built/pushed or is not present locally.
Not authenticated to the registry or Scout
Analyzing a private image needs registry login; some Scout features need a Scout/Hub login.
SBOM generation failed for the image
An unusual base or corrupt layer can prevent SBOM extraction.
How to fix it
Build/push then analyze with auth
- Ensure the image exists, log in, then run Scout.
docker login ghcr.io -u myorg --password-stdin <<< "$REGISTRY_TOKEN"
docker scout cves ghcr.io/myorg/api:1.4.2Analyze a locally loaded image
- Load the image locally and point Scout at the local reference.
docker buildx build -t myorg/api:scan --load .
docker scout quickview myorg/api:scanHow to prevent it
- Analyze images that are actually built and reachable.
- Authenticate to the registry (and Scout) before analysis.
- Run Scout after the image is available, not before.