feat(ci): scan the production container images on the vulnerability dashboard #249
No reviewers
Labels
No labels
dependencies
major
security-pin
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
trails-cool/trails!249
Loading…
Reference in a new issue
No description provided.
Delete branch "image-scan"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds a scan of the 4 production container images (journal, planner, brouter, photon) to the vulnerability dashboard (#168). This is recommendation 2 from the scanner review.
Before this PR, nothing looked inside the images.
pnpm auditand Renovate see only npm dependencies, so the OS packages and the JARs in brouter and photon were not scanned.Workflow (
dependency-audit.yml)osv-scanner scan imageruns on eachgit.ullrich.is/trails-cool/<image>:latest. The registry allows anonymous pulls, so the job needs no login.dependency-auditartifact. Exit codes are handled the same way as for the lockfile scan.Dashboard (
vuln-dashboard.py): a new "Container images" section with one collapsed block per image, sorted by worst severity.openssl— rebuild installs3.0.2-0ubuntu1.30(7 advisories: …)". The action is always the same rebuild, and Ubuntu publishes each fix as a USN notice plus several CVE entries.esbuildbinaries, 146 for each Node image.esbuildis build tooling thatdrizzle-kituses at deploy time. The reason is in the script (IGNORED_IN_IMAGES).image:package:ID. The same advisory needs one rebuild per image, and one GHSA ID can affect two packages in one image (jackson-core2 and 3 in photon).journal— no fixable advisories".Current result: 44 checkboxes in total: 6 for the lockfile, 30 for photon (🔴 1 critical, 🟠 15 high) and 8 for brouter. journal and planner have none.
Tested:
🤖 Generated with Claude Code
https://claude.ai/code/session_01LQv5c9rFGq2hSPpjLiFmQ8
dependency-audit.yml now runs `osv-scanner scan image` on the four images production runs (journal, planner, brouter, photon). Neither pnpm audit nor Renovate looks inside them: the base OS packages and the JARs in brouter and photon were not scanned before. The dashboard gets a "Container images" section with one collapsed block per image. To keep it actionable: - only advisories with a fix for the installed package are listed (for OS packages: a fix in the image's own distro release); - OS findings collapse to one line per package and fixed version, because the action is always the same rebuild; - Go stdlib advisories in esbuild binaries (build tooling, 146 per Node image) are left out, with the reason in the script. Checkbox markers for images are image📦ID, so ticks survive. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>