Skip to content

fix(image): take Debian security fixes at build time (#504) - #507

Merged
bbertucc merged 1 commit into
mainfrom
worktree-scan-504
Oct 4, 2026
Merged

bbertucc merged 1 commit into
mainfrom
worktree-scan-504

Conversation

@bbertucc

@bbertucc bbertucc commented Oct 4, 2026

Copy link
Copy Markdown
Member

Iris Maintainer Agent here.

Closes #504.

scan fails on main and on every PR: Trivy finds libpcre2-8-0 CVE-2026-103111 (HIGH) in the image. node:24-slim ships 10.42-1+deb12u1, and the fix is in deb12u2.

The Dockerfile now runs apt-get upgrade -y before installing its packages, so the image takes Debian's security fixes without waiting for the node image to be rebuilt. This PR's own scan run is the test.

This unblocks #506.

🤖 Generated with Claude Code

The scan check fails on libpcre2-8-0 (CVE-2026-103111, HIGH): node:24-slim
ships 10.42-1+deb12u1 and the fix is in deb12u2. `apt-get upgrade` picks up
fixes like this before the base image is rebuilt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One-line Dockerfile change; no src/, workflow, agent, docs or dependency changes. Every check in the summary passes, and the PR's own scan check — the stated test of this fix — is pass (run 37206503371), so the libpcre2 claim in the description is confirmed rather than predicted.

Three things I checked that are correct in the diff, so nobody re-raises them:

  • apt-get upgrade -y runs before apt-get install ... git ca-certificates poppler-utils, but both share the single apt-get update index inside the same RUN, so the newly installed packages resolve to the fixed versions too. Ordering is fine.
  • ci.yml:61 is a plain docker build with no cache import, so each PR run and the nightly main run rebuilds this layer and re-takes whatever Debian has published. There is no stale-layer path that would let scan pass once and then silently keep a vulnerable package.
  • rm -rf /var/lib/apt/lists/* still terminates the RUN, so no apt index is left in the layer.

Non-blocking notes

Dockerfile:10:

RUN apt-get update && apt-get upgrade -y \

apt-get upgrade by definition never installs a new package or removes one, so a security fix that arrives as a new dependency or a package rename is held back silently, while the comment directly above says the image "takes Debian's security fixes" without qualification. Latent: it needs an advisory whose fix is not a straight in-place version bump, and today's libpcre2-8-0 10.42-1+deb12u1 → deb12u2 is one. The day it isn't, scan fails with nothing in the log saying upgrade declined the candidate — which reads like a new unfixed CVE rather than a mechanism that opted out. dist-upgrade -y covers that case; so does pinning the one package, at the cost of a commit per advisory.

Accessibility impact: none — the change alters only which OS package versions the image carries, and touches no pipeline, agent prompt, or delivered HTML.

@bbertucc
bbertucc merged commit 6f221fe into main Oct 4, 2026
7 checks passed
@bbertucc
bbertucc deleted the worktree-scan-504 branch October 4, 2026 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Nightly security scan failed on main

1 participant