Skip to content

[Autofix] Bump go-git/v5 to v5.18.0 in cli/go-git to fix critical CVE#12

Open
vardior9 wants to merge 1 commit into
masterfrom
autofix/4LFsmeCMyUmfLns1h6xyqQ
Open

[Autofix] Bump go-git/v5 to v5.18.0 in cli/go-git to fix critical CVE#12
vardior9 wants to merge 1 commit into
masterfrom
autofix/4LFsmeCMyUmfLns1h6xyqQ

Conversation

@vardior9
Copy link
Copy Markdown
Member

✅ Fixed

  • OSS · View in Apiiro

    • Summary:
      Upgraded the direct dependency github.com/go-git/go-git/v5 in cli/go-git/go.mod from v5.12.0 to v5.18.0, which clears the critical SCA finding, and regenerated go.sum with go mod tidy.

    • What Changed:
      Edited cli/go-git/go.mod to change github.com/go-git/go-git/v5 v5.12.0 to github.com/go-git/go-git/v5 v5.18.0. Then ran go mod tidy from cli/go-git/, which regenerated cli/go-git/go.sum and refreshed transitive indirect requires (e.g. golang.org/x/crypto, golang.org/x/net, Microsoft/go-winio, cloudflare/circl, pjbgf/sha1cd, cyphar/filepath-securejoin, ProtonMail/go-crypto, golang.org/x/sys, skeema/knownhosts, golang.org/x/text, go-git/go-billy, golang.org/x/tools, golang.org/x/mod) to versions compatible with v5.18.0. The Go toolchain directive was auto-updated from go 1.20 to go 1.24.0 with toolchain go1.24.13 because v5.18.0 requires a newer Go module syntax. Verified the package compiles with go build ./....

    • Why This Fix:
      The overlay listed two remediation strategies (v5.18.0 and a pseudo-version v5.18.1-0.20260420130857-e5bbc088b774). I picked v5.18.0 because it is the smallest, properly tagged release that clears the vulnerability and is closest to the current 5.12.0 — the overlay explicitly instructs choosing the smallest non-breaking bump, and a tagged release is preferred over a pseudo-version for reproducibility. The dependency is declared directly in this manifest (Declaration Type: Direct), so a manifest version bump plus go mod tidy is the canonical fix; no replace directive is required because the parent repo at /tmp/repo is a separate module path that the published v5.18.0 satisfies.

    • Files Changed:

      • cli/go-git/go.mod
      • cli/go-git/go.sum
    • Reviewer Notes:

      • go mod tidy raised the module's go directive from 1.20 to 1.24 and added a toolchain go1.24.13 line — go-git v5.18.0 requires this; CI for cli/go-git will need a Go 1.24+ toolchain.
      • Several indirect deps (golang.org/x/crypto, x/net, x/sys, ProtonMail/go-crypto, cloudflare/circl, etc.) were bumped to satisfy v5.18.0's requirements; this is expected from go mod tidy.
    • Potential Impact:
      The bump from v5.12.0 to v5.18.0 is six minor releases inside the same v5 major line; go-git maintains backward compatibility within v5, so the public API used by the cli should still compile (verified locally with go build ./...). The main externally visible change is the go 1.24 requirement in cli/go-git/go.mod, which means any build environment pinned to Go <1.24 for this submodule will need its toolchain updated.


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.

@vardior9 vardior9 added the apiiro-autofix Pull requests generated by Apiiro Autofix label May 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apiiro-autofix Pull requests generated by Apiiro Autofix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant