calvigil scan-image
Scan Docker/OCI container images for known vulnerabilities.
Table of contents
- Usage
- Prerequisites
- Flags
- Supported Image References
- Examples
- Scan a Docker Hub Image
- Scan a Private Registry Image
- JSON Output
- Offline Inventory
- Filter Critical Only
- How It Works
- Supported Image Ecosystems
Usage
calvigil scan-image [flags] <image-reference>
Prerequisites
- Syft must be installed and on your PATH
- Docker (for pulling images that aren’t local)
# Install syft
curl -sSfL https://raw.githubusercontent.com/anchore/syft/main/install.sh | sh -s -- -b /usr/local/bin
Flags
| Flag | Short | Default | Description |
--format | -f | table | Output format |
--output | -o | stdout | Output file path |
--severity | -s | all | Minimum severity filter |
--offline | | false | Extract image package inventory without vulnerability database calls |
--verbose | -v | false | Verbose output |
Supported Image References
| Format | Example |
| Docker Hub | nginx:latest, library/nginx:1.25 |
| Registry | ghcr.io/org/image:tag |
| Local archive | ./image.tar |
| Directory | dir:/path/to/rootfs |
Examples
Scan a Docker Hub Image
calvigil scan-image nginx:latest
Scan a Private Registry Image
calvigil scan-image ghcr.io/myorg/myapp:v2.1.0
JSON Output
calvigil scan-image --format json --output image-vulns.json python:3.12-slim
Offline Inventory
calvigil scan-image --offline --format json dir:/path/to/rootfs
Filter Critical Only
calvigil scan-image --severity critical node:20-alpine
How It Works
- SBOM extraction — Syft analyzes the image layers and produces a software bill of materials
- Ecosystem mapping — Package types (deb, rpm, apk, npm, pip, etc.) are mapped to calvigil ecosystems
- PURL generation — Each package gets a Package URL for precise database lookups
- Vulnerability matching — Aggregated matcher pipeline (OSV plus configured NVD/GitHub Advisory sources)
- Canonical normalization — Results are normalized and merged across databases
- KEV enrichment — Actively exploited CVEs are flagged
Supported Image Ecosystems
| Package Type | Ecosystem | Database Coverage |
npm | npm | OSV plus configured NVD/GitHub Advisory sources |
python, pip, wheel | PyPI | OSV plus configured NVD/GitHub Advisory sources |
go-module | Go | OSV plus configured NVD/GitHub Advisory sources |
java-archive, maven | Maven | OSV plus configured NVD/GitHub Advisory sources |
deb | Debian | OSV |
rpm | RPM | OSV |
apk | Alpine | OSV |