Trivy flags CVEs in `/usr/local/lib/python3.12/site-packages/pip` inside the runtime image
BeginnerTroubleshootingContainer image and IaC scanning
Answer
Likely causes → The official Python image ships pip, setuptools and wheel; old versions carry CVEs, even though your app never runs pip at runtime.
Diagnose → trivy image --pkg-types library myapp:1.4 | grep -E "pip|setuptools"
Fix → Upgrade or remove them in the final stage:
RUN pip install --no-cache-dir -U pip setuptools && pip uninstall -y pip
Or use a multi-stage build that copies only the venv into a distroless Python base.
Prevent → Minimal runtime stages; build tools stay in the builder stage.
More on Container image and IaC scanning
Trivy fails the build on 14 HIGH/CRITICAL CVEs in the base image, all with "Fixed Version" emptyBeginner`FATAL ... failed to download vulnerability DB: ... TOOMANYREQUESTS: retry-after` from Trivy in CIIntermediateTrivy in an air-gapped runner fails with `failed to download vulnerability DB` even though you copied `db.tar.gz`AdvancedTrivy and Grype report different CVE counts for the same imageIntermediate`.trivyignore` entries are ignored and the build still fails on the same CVEBeginnerTrivy reports a critical CVE in a Go binary built from your own code, in package `stdlib`Intermediate