Skip to content

Take Alpine OS fixes at build time and pin the runtime base image by digest - #79

Merged
codeministry merged 1 commit into
mainfrom
chore/base-image-os-fixes
Nov 24, 2026
Merged

codeministry merged 1 commit into
mainfrom
chore/base-image-os-fixes

Conversation

@codeministry

Copy link
Copy Markdown
Owner

Why

Code scanning alert #34 (Trivy, medium): CVE-2026-4738 in zlib 1.3.2-r1 in the leadgen-api image, fixed in 1.4-r0.

The fix did not depend on the base image. zlib 1.4-r0 is already in the Alpine repositories, while the current
eclipse-temurin:25-jre-alpine (Alpine 3.24.4) still ships 1.3.2-r1, so a plain rebuild would not have closed it.

Change (backend/Dockerfile, runtime stage only)

  • apk upgrade --no-cache in the same RUN as the user creation: OS fixes are taken at build time.
  • Base image pinned by digest (@sha256:69c2a26e…, the multi-arch index): a Temurin rebuild of the tag now arrives as
    a Renovate digest pull request instead of changing under the build unnoticed.

Renovate could not report this CVE: zlib is an OS package inside the base image and appears in no file Renovate
reads, and a code scanning alert is not a Dependabot alert.

Checked

Against the pinned image on linux/arm64: after apk upgrade --no-cache zlib is 1.4-r0, and addgroup/adduser
create app (uid 100, gid 101) as before. The full image build runs in CI; after it, the Trivy scan should close #34.

…digest

zlib 1.4-r0 (CVE-2026-4738, code scanning alert #34) was in the Alpine repositories while
eclipse-temurin:25-jre-alpine still shipped 1.3.2-r1, so a rebuild alone would not have fixed it.
apk upgrade in the runtime stage takes such fixes when the image is built. The digest pin turns a
Temurin rebuild of the tag into a Renovate pull request instead of a silent change.
@codeministry codeministry self-assigned this Nov 24, 2026
@codeministry
codeministry merged commit d5c8287 into main Nov 24, 2026
5 of 6 checks passed
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.

1 participant