feat(ci): scan the production container images on the vulnerability dashboard #249

Merged
ullrich merged 1 commit from image-scan into main 2026-10-11 12:23:17 +00:00
Owner

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 audit and 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 image runs on each git.ullrich.is/trails-cool/<image>:latest. The registry allows anonymous pulls, so the job needs no login.
  • It handles one image at a time and removes it after its scan, so only one image (up to ~1.7 GB) is on the runner's disk at a time.
  • It writes JSON and SARIF for each image to the dependency-audit artifact. 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.

  • Fix available only. The raw scan has 1,248 advisories, and most of them have no fix yet. For OS packages, only a fix in the image's own distro release counts (Debian 13, Ubuntu 22.04).
  • OS packages: one line per package and fixed version, for example "openssl — rebuild installs 3.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.
  • Ignored: Go standard-library advisories in esbuild binaries, 146 for each Node image. esbuild is build tooling that drizzle-kit uses at deploy time. The reason is in the script (IGNORED_IN_IMAGES).
  • Checkbox markers are image:package:ID. The same advisory needs one rebuild per image, and one GHSA ID can affect two packages in one image (jackson-core 2 and 3 in photon).
  • An image with nothing to fix shows as "✅ 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:

  • Locally with real scans of all 4 images.
  • In CI with a run started by hand on this branch (run 2647, 5½ minutes). That run updated #168 with the same 44 checkboxes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LQv5c9rFGq2hSPpjLiFmQ8

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 audit` and 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 image` runs on each `git.ullrich.is/trails-cool/<image>:latest`. The registry allows anonymous pulls, so the job needs no login. - It handles one image at a time and removes it after its scan, so only one image (up to ~1.7 GB) is on the runner's disk at a time. - It writes JSON and SARIF for each image to the `dependency-audit` artifact. 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. - **Fix available only.** The raw scan has 1,248 advisories, and most of them have no fix yet. For OS packages, only a fix in the image's own distro release counts (Debian 13, Ubuntu 22.04). - **OS packages:** one line per package and fixed version, for example "`openssl` — rebuild installs `3.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. - **Ignored:** Go standard-library advisories in `esbuild` binaries, 146 for each Node image. `esbuild` is build tooling that `drizzle-kit` uses at deploy time. The reason is in the script (`IGNORED_IN_IMAGES`). - **Checkbox markers** are `image:package:ID`. The same advisory needs one rebuild per image, and one GHSA ID can affect two packages in one image (`jackson-core` 2 and 3 in photon). - An image with nothing to fix shows as "✅ `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:** - Locally with real scans of all 4 images. - In CI with a run started by hand on this branch (run 2647, 5½ minutes). That run updated #168 with the same 44 checkboxes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01LQv5c9rFGq2hSPpjLiFmQ8
feat(ci): scan the production container images on the vulnerability dashboard
All checks were successful
CI / Dockerfile Package Check (pull_request) Successful in 5s
CI / Security Scan (pull_request) Successful in 6s
CI / Visual Tests (pull_request) Successful in 36s
CI / Checks (pull_request) Successful in 54s
CI / Journal Image Smoke Test (pull_request) Successful in 58s
CI / E2E Tests (pull_request) Successful in 2m54s
Cancel superseded CI / Cancel in-flight CI (pull_request) Successful in 2s
bf0653c941
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>
ullrich scheduled this pull request to auto merge when all checks succeed 2026-10-11 12:19:23 +00:00
ullrich deleted branch image-scan 2026-10-11 12:23:18 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
trails-cool/trails!249
No description provided.