Skip to content

fix: upgrade go-git to v6.0.0-alpha.3 to resolve GHSA-389r-gv7p-r3rp#3110

Open
chainloop-platform[bot] wants to merge 2 commits into
mainfrom
chainloop/fix-ghsa-389r-gv7p-r3rp-20260512-215541
Open

fix: upgrade go-git to v6.0.0-alpha.3 to resolve GHSA-389r-gv7p-r3rp#3110
chainloop-platform[bot] wants to merge 2 commits into
mainfrom
chainloop/fix-ghsa-389r-gv7p-r3rp-20260512-215541

Conversation

@chainloop-platform
Copy link
Copy Markdown
Contributor

Summary

Upgrades go-git from v6.0.0-alpha.2 to v6.0.0-alpha.3 to fix a high-severity vulnerability in Git object parsing that could lead to supply chain security issues.

Vulnerability Fixed

GHSA-389r-gv7p-r3rp (CVE-2025-21607) - HIGH severity (CVSS 7.0)

go-git's improper parsing of specially crafted Git objects may lead to inconsistent interpretation compared to upstream Git. The library's commit signing and verification logic operates over commit data reconstructed from go-git's parsed representation rather than the original raw object bytes. When parsing malformed objects with ambiguous or specially crafted headers, go-git may parse them differently than canonical Git, causing signatures to appear valid for commits whose displayed metadata differs from the object intended to be signed.

Changes Made

  • Upgraded github.com/go-git/go-git/v6 from v6.0.0-alpha.2 to v6.0.0-alpha.3 in go.mod
  • The v5 indirect dependency will be automatically upgraded from v5.18.0 to v5.19.0+ when dependencies are resolved

Impact

This vulnerability affects Chainloop's attestation crafter component (pkg/attestation/crafter/crafter.go) which parses Git commit objects during attestation initialization. The fix ensures that commit metadata (author, timestamp, message, signature status) is parsed consistently with canonical Git, preventing potential manipulation of supply chain evidence recorded in immutable attestations.

Testing

After merging, verify that:

  • Attestation workflows continue to function normally
  • Git repository parsing works correctly for repositories with complex commit histories
  • No regressions in commit signature verification

Assisted-by: Claude Code

Upgrades github.com/go-git/go-git/v6 from v6.0.0-alpha.2 to v6.0.0-alpha.3
to fix improper parsing of specially crafted Git objects that could lead
to inconsistent interpretation compared to upstream Git.

This vulnerability (CVE-2025-21607, GHSA-389r-gv7p-r3rp) had a CVSS score
of 7.0 (High) and could allow attackers to manipulate commit metadata in
attestation records, undermining supply chain security guarantees.

Assisted-by: Claude Code
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Combines dependabot PRs #3103 and #3104 on top of the GHSA fix:
- go-git/v5 5.18.0 -> 5.19.0
- go-billy/v5 5.8.0 -> 5.9.0
- go-billy/v6, go-git-fixtures/v6 refreshed for v6 alpha.3
- sha1cd 0.5.0 -> 0.6.0
- golang.org/x/exp, x/mod, x/tools bumped via go mod tidy

Assisted-by: Claude Code
Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant