Repository navigation
Take Alpine OS fixes at build time and pin the runtime base image by digest - #79
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Code scanning alert #34 (Trivy, medium): CVE-2026-4738 in zlib 1.3.2-r1 in the
leadgen-apiimage, 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-cachein the sameRUNas the user creation: OS fixes are taken at build time.@sha256:69c2a26e…, the multi-arch index): a Temurin rebuild of the tag now arrives asa 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: afterapk upgrade --no-cachezlib is1.4-r0, andaddgroup/addusercreate
app(uid 100, gid 101) as before. The full image build runs in CI; after it, the Trivy scan should close #34.