[Autofix] Bump go-git/v5 to v5.17.2 in cli/go-git to fix critical CVEs#9
Open
vardior9 wants to merge 1 commit into
Open
[Autofix] Bump go-git/v5 to v5.17.2 in cli/go-git to fix critical CVEs#9vardior9 wants to merge 1 commit into
vardior9 wants to merge 1 commit into
Conversation
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.
✅ Fixed
OSS · View in Apiiro
Summary:
Bumped the direct dependency
github.com/go-git/go-git/v5incli/go-git/go.modfrom v5.12.0 to v5.17.2 (the nearest fix version per the overlay) and regeneratedcli/go-git/go.sumviago mod tidy.What Changed:
Edited
cli/go-git/go.modto upgradegithub.com/go-git/go-git/v5fromv5.12.0tov5.17.2. Rango mod tidyfrom thecli/go-gitdirectory, which refreshedcli/go-git/go.sumand propagated the resulting transitive bumps (e.g.golang.org/x/crypto0.31.0→0.45.0,golang.org/x/net0.23.0→0.47.0,ProtonMail/go-crypto1.0.0→1.1.6,cyphar/filepath-securejoin0.2.4→0.4.1,cloudflare/circl1.3.7→1.6.3). The Go toolchain directive was also updated togo 1.24.0/toolchain go1.24.13because the new go-git release requires a newer minimum Go version. Verified withgo build ./...from the cli/go-git module — the build completes with no errors.Why This Fix:
The overlay's only listed remediation strategy is the direct upgrade to v5.17.2 (the nearest fix version), so I applied exactly that — the smallest patch-level bump within the v5 line that clears the critical CVE chain. Alternatives (replace directives or pinning to an even newer release) were not necessary because v5.17.2 already publishes a clean dependency tree and
go mod tidyresolved everything cleanly. This repo is the upstream go-git project itself, but the CLI lives in its own module that consumes the published v5 module, so a manifest-level bump is the correct lever.Files Changed:
cli/go-git/go.modcli/go-git/go.sumReviewer Notes:
go mod tidyraised the module's minimum Go directive fromgo 1.20togo 1.24.0(withtoolchain go1.24.13) because go-git v5.17.x requires a newer Go. Confirm any CI that buildscli/go-gituses Go 1.24+.go mod tidy(golang.org/x/crypto, x/net, ProtonMail/go-crypto, cloudflare/circl, etc.); these are the versions go-git v5.17.2 pins.Potential Impact:
Low-to-medium blast radius: only the standalone
cli/go-gitmodule is affected — the top-levelgithub.com/go-git/go-git/v5module is untouched. The CLI's source files (main.go, receive_pack.go, upload_pack.go, update_server_info.go, version.go) compile cleanly against v5.17.2 with no API changes required. The bumped Go toolchain requirement (1.20 → 1.24) is the most likely friction point for downstream builders of this CLI.About Apiiro Autofix
This PR was automatically generated by Apiiro Autofix. Review all changes carefully before merging and run your test suite to verify no regressions.