Repository navigation
Clear reachable vulnerabilities in the shipped binary (compress, go-github) - #65
Merged
Merged
Conversation
govulncheck in binary mode against the built CLI reported two reachable findings; both are addressed here. * klauspost/compress v1.18.0 -> v1.18.7 fixes GO-2026-5841, an OOB read in compress/s2. Reached through compress/zstd and internal/snapref rather than by importing s2 directly, which is why a package-level dependency listing does not show it. * go-github v39 -> v92 removes the golang.org/x/crypto/openpgp path (GO-2026-5932, unmaintained and unsafe by design, no fix available). go-github dropped its x/crypto dependency at v60; v92 is current. x/crypto stays in the module graph via other dependencies, but the openpgp package is no longer imported or linked. Two API changes were required. NewClient now takes options and returns an error, and WithHTTPClient rejects a nil client, so source/github only passes it when the URL carried user info -- preserving the previous "defaults to http.DefaultClient" behaviour. NewEnterpriseClient is gone; source/github_ee composes WithHTTPClient and WithEnterpriseURLs instead. Verified with a binary built at the shipped build tags using Go 1.26.8: "No vulnerabilities found", 0 reachable, 1 module-graph-only advisory. Note this diverges from upstream, which is still on go-github v39, so future upstream merges will conflict on these two files.
Coverage Report for CI Build 35295279278Coverage increased (+0.03%) to 52.649%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
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.
govulncheck -mode binaryagainst the built CLI found two reachable findings. Both are fixed here; the shipped artifact now reports zero reachable vulnerabilities.Findings
compress/s2klauspost/compressv1.18.0, reachablev1.18.7, clearedopenpgpunmaintained / unsafe by design, no fix availablex/cryptoviago-github/v39go-githubdropped itsx/cryptodependency at v60; this goes to v92 (current).x/cryptois still in the module graph via other dependencies, but theopenpgppackage is no longer imported or linked — it drops from a reachable finding to a module-graph-only advisory.API changes this required
go-githubv92 changed the client constructor, so this isn't a pure version bump:NewClientnow takes options and returns an error.WithHTTPClientexplicitly rejects a nil client, andsource/githubcould previously pass nil (the URL may carry no user info, where v39 silently fell back tohttp.DefaultClient). The option is now applied only when a client exists, preserving that behaviour rather than turning it into an error.NewEnterpriseClientwas removed.source/github_eecomposesWithHTTPClient+WithEnterpriseURLsinstead.Verification
Built at the real shipped build tags with Go 1.26.8, then scanned:
go build ./...,go vet ./...clean.go test ./source/... ./internal/... .passes, includingsource/githubandsource/github_ee.go-github v92.0.0,compress v1.18.7,go1.26.8.Two scanning notes worth recording, since both produced misleading results during this work:
govulncheck ./...under-reports for this repo. Every driver sits behind a build tag, so a source scan without theMakefiletag set cannot see them — that's why thecompress/s2finding first appeared only at module level. Use binary mode, or source mode with the full tag set.docker buildstill reported openpgp as reachable after the fix, contradictinggo mod whyandgo list -deps. Building directly with the toolchain resolved it. Don't trust a containerised rescan without--no-cache.Note
Upstream is still on
go-github v39, so future upstream merges will conflict onsource/github/github.goandsource/github_ee/github_ee.go.Not addressed here: the
docker/dockeradvisories (no fix available, and reachable only throughdktesting, which is imported exclusively by_test.gofiles — never linked into the CLI or library).🤖 Generated with Claude Code