fix: reduce CVEs in build-go-alpine and service-base-alpine#59
Merged
Conversation
Bump Go 1.26.1 -> 1.26.2 and Alpine 3.22 -> 3.23 to pick up upstream security patches, and switch golangci-lint from a prebuilt release binary to `go install` with a pinned version so it is rebuilt against the pinned Go toolchain (and verified via go.sum). Docker Scout scan results for build-go-alpine: - before: 42 CVEs (1 Critical, 13 High, 25 Medium, 2 Low, 1 Unspecified) - after: 22 CVEs (0 Critical, 6 High, 15 Medium, 1 Low) The remaining 22 CVEs are all in Alpine 3.23 apk packages marked "not fixed" upstream (binutils, curl, nghttp2, unzip, git-lfs, openssh, busybox). service-base-alpine is unchanged behaviorally and still contains only the single upstream-unfixed busybox CVE.
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.
Summary
Reduces CVEs in our published container images after a customer-initiated Docker Scout review flagged a large set of vulnerabilities in
v0.0.96/v0.0.97.1.26.1→1.26.2(fixes stdlib CVEs including those flagged as High).3.22→3.23(newergit-lfsbuilt with Go 1.25.9 — this is what eliminates the Criticalstdlib 1.24.12CVE embedded in the oldergit-lfsbinary).golangci-lintfrom a prebuilt release tarball togo install ...@v${GOLANGCI_LINT_VERSION}so it is rebuilt with our pinned Go toolchain (and verified viago.sum). This removes the 4 Highstdlib 1.26.1CVEs embedded in the upstream prebuilt binary.Docker Scout results —
build-go-alpinev0.0.97All 22 remaining CVEs are in Alpine 3.23 apk packages flagged
not fixedupstream:not fixednot fixednot fixedzipnot fixednot fixednot fixedThese are only resolvable by switching base distros (e.g. Chainguard/Wolfi) — out of scope for this PR.
service-base-alpineUnchanged behaviorally. Still 1 Medium busybox CVE (same
not fixedupstream status). No regression.Test plan
linux/amd64andlinux/arm64.go version,golangci-lint version,gotestsum --version, andgo-bindata -versionin the published image.docker scout cveson the published tag to confirm the numbers above.