chore: upgrade go-git to v5.19.2 to address CVE-2026-71556, CVE-2026-71557 - #21
Merged
Merged
Conversation
…71557 Bumps github.com/go-git/go-git/v5 from v5.19.1 to v5.19.2, the patched floor for two advisories affecting filesystem-backed repositories: - CVE-2026-71556 (HIGH): worktree operations could follow symlinks already present in the worktree, letting a path that is safe as a string resolve into the repository's .git metadata directory. - CVE-2026-71557 (MEDIUM): loose reference names were used as paths without verifying the resolved path stayed inside the reference storage, so a name such as refs/heads/../../config could reach unrelated repository metadata. zoekt uses go-git with filesystem-backed storage in gitindex, so both advisories apply. golang.org/x/crypto, golang.org/x/net, and golang.org/x/sys move up to v0.53.0, v0.56.0, and v0.46.0 respectively because those are go-git v5.19.2's own required minimums; no other dependency changes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
brendan-kellam
approved these changes
Aug 10, 2026
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
Upgrades
github.com/go-git/go-git/v5from v5.19.1 to v5.19.2, the patched floor for two advisories reported by Dependabot. Both affect filesystem-backed repositories, which is how zoekt uses go-git (gitindexoperates on on-disk clones), so both apply here.worktreeFilesystemwrapper rejected dangerous path strings, but did not stop operations from following symlinks already present in the worktree, so a string-safe path could resolve into.git. Fixed by making the worktree filesystem wrapper a symlink-safe boundary.refs/heads/../../configcould reach unrelated repository metadata. Fixed by validating reference names at thedotgitstorage entry points.Changes
Only
go.modandgo.sumare touched — no source changes were needed, as the fixes are internal to go-git.golang.org/x/crypto(v0.52.0 → v0.53.0),golang.org/x/net(v0.55.0 → v0.56.0), andgolang.org/x/sys(v0.45.0 → v0.46.0) move up because those versions are go-git v5.19.2's own required minimums, not discretionary upgrades. No other dependencies changed.Verification
go list -m github.com/go-git/go-git/v5resolves tov5.19.2;go.sumretains no v5.19.1 entry, so no affected version remains in the graph.govulncheck ./...reports no go-git findings in its symbol, package, or module results. It does still report three findings in unrelated modules (go.opentelemetry.io/otelGO-2026-5158,golang.org/x/crypto/openpgpGO-2026-5932,github.com/klauspost/compressGO-2026-5841); those are outside the scope of these two issues and are intentionally left alone.go build ./...andgo build ./cmd/...pass.go test ./... -shortpasses exceptinternal/e2e, which fails identically on unmodifiedmainin this environment becauseuniversal-ctags/scip-ctagsare not installed (universal-ctags is missing,scip-ctags not available). Verified as a pre-existing baseline failure, unrelated to this change../gitindex/...and./index/...— the packages that consume go-git — pass.go vet ./...output is byte-identical to themainbaseline.Fixes SOU-1910
Fixes SOU-1911
🤖 Generated with Claude Code
Note
Low Risk
Dependency-only security patch with no zoekt source changes; risk is limited to go-git behavior changes in v5.19.2, which is the intended remediation path.
Overview
Bumps
github.com/go-git/go-git/v5from v5.19.1 to v5.19.2 to pick up fixes for two filesystem-related advisories (symlink traversal in worktree operations and malicious reference names escaping reference storage). Zoekt uses go-git against on-disk repos viagitindexand related tooling, so these CVEs are relevant even though this PR does not change application code.go.modandgo.sumonly. Transitive minimums move with go-git:golang.org/x/cryptov0.52.0 → v0.53.0,golang.org/x/netv0.55.0 → v0.56.0, andgolang.org/x/sysv0.45.0 → v0.46.0.Reviewed by Cursor Bugbot for commit a516d1d. Bugbot is set up for automated code reviews on this repo. Configure here.