Skip to content

fix(docker): apply bookworm security updates in the image base - #2408

Merged
thiras merged 1 commit into
mainfrom
fix/image-base-security-upgrade
Oct 10, 2026
Merged

thiras merged 1 commit into
mainfrom
fix/image-base-security-upgrade

Conversation

@thiras

@thiras thiras commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The weekly Security workflow's Trivy image scans fail on the published images (run 38047944439): ghcr.io/decdn/decdn{,-node}:latest ship perl-base 5.36.0-7+deb12u3, with 3 CRITICAL and 4 HIGH CVEs fixed in deb12u4. The filesystem scan is already green after #2309.

The pinned bookworm-slim digest is already the current upstream tag. Bookworm is oldstable, so Debian puts fixes in bookworm-security long before it rebuilds the slim image, and bumping the digest won't help.

  • Dockerfile: run apt-get upgrade in the base stage. This also picks up pending fixes for gnutls, lzma, pcre2, gcrypt and tzdata.
  • release.yml: set no-cache: true on the image build instead of using the gha layer cache. With the cache, the apt layer replays stale for as long as the digest and RUN text stay the same, so later releases would miss new security fixes. The other layers copy each release's fresh binaries, so the cache saved nothing.

Verification

  • Built the decdn stage locally with stub binaries. Trivy 0.70.0 (--severity CRITICAL,HIGH --ignore-unfixed) reports 0 findings; perl-base is 5.36.0-7+deb12u4.
  • The scheduled scan checks the published :latest, so it stays red until the next release is cut from this change.

🤖 Generated with Claude Code

The weekly Trivy image scan fails on the published images: the pinned
bookworm-slim digest ships perl-base 5.36.0-7+deb12u3 (3 CRITICAL, 4 HIGH,
fixed in deb12u4). The digest is already the current upstream tag; Debian
publishes oldstable fixes to bookworm-security long before it rebuilds the
slim image.

Run `apt-get upgrade` in the base stage, and drop the gha layer cache from
the release image build so the upgrade layer is never replayed stale.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 10, 2026 11:21
@thiras thiras self-assigned this Oct 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The changes correctly refresh security packages for both image stages on every release build.

0 open findings

What changed in this PR

Updates published container images with current Debian Bookworm security fixes while preventing stale package layers from being reused.

Changes:

  • Runs apt-get upgrade before installing runtime dependencies.
  • Disables Docker layer caching for release image builds.
File Description
Dockerfile Applies available Bookworm security updates.
.github/​workflows/​release.yml Forces uncached release image builds.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@thiras
thiras merged commit 038a6a3 into main Oct 10, 2026
32 checks passed
@thiras
thiras deleted the fix/image-base-security-upgrade branch October 10, 2026 11:30
thiras added a commit that referenced this pull request Oct 10, 2026
* chore(docker): move the image base to debian trixie-slim

Bookworm is oldstable and has been in LTS since June 2026, with a
reduced package set, and its stale slim image is what tripped the weekly
Trivy scan (#2408). Pin debian:trixie-slim (Debian 13, glibc 2.41) by
its multi-arch index digest instead. Dependabot only bumps the digest
and never the codename, so the Dockerfile now says the release move is
a manual edit.

The release binaries are cross-built against the 2.31 floor, so they run
unchanged. The release.yml glibc comments now name Debian 12 / RHEL 9 as
the distributions a native build would break, since our own image no
longer sits below the runner's glibc.

Verified locally: both stages build and run `--version` on trixie, and
Trivy (CRITICAL,HIGH, ignore-unfixed, as security.yml runs it) reports 0
findings on both images.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: changelog entry for the trixie base and review fixups

The CHANGELOG is all [Unreleased], so the digest-pin entry naming
`bookworm-slim` described the shipped state; it now names `trixie-slim`,
and a Changed entry records the move. The Dockerfile names every place a
codename move touches, and the release.yml glibc comments say the floor
is set by the release archives rather than the images, without repeating
the distro list twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

2 participants