You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Attestation init fails: go-git v5.17.1 does not support worktreeconfig extension #2966
The go-git v5.17.1 upgrade (#2961, merged 2026-03-30) likely introduced stricter validation of git repository format extensions. When a repository has worktreeConfig enabled, go-git now rejects it as an unsupported extension.
Impact
Any CI pipeline using Chainloop attestation in a repository with worktree config enabled will fail at the init step.
The go-git v5.17.0 release introduced strict extension validation in go-git/go-git#1861. This validation has a case-sensitivity bug that causes it to reject the worktreeConfig extension.
The extensions() function lowercases all extension names via strings.ToLower(opt.Key) → produces "worktreeconfig"
The extensionsValidForV0 allowlist uses mixed case: "worktreeConfig"
Go map lookups are case-sensitive, so extensionsValidForV0["worktreeconfig"] misses the "worktreeConfig" entry → extension appears unsupported
For repos with repositoryFormatVersion=1 (standard when using git worktree), worktreeConfig also isn't in builtinExtensions at all, so it fails via the ErrUnknownExtension path regardless.
go-git now calls verifyExtensions during open, which rejects worktreeConfig
The error propagates up as a hard failure, breaking attestation init
Fix options
Chainloop-side (short-term): Handle extension errors gracefully in gracefulGitRepoHead — it already degrades gracefully for missing repos/refs (returns nil). The unknown/unsupported extension errors should get the same treatment so attestation can proceed without git metadata.
Upstream (go-git): File a bug about the case-sensitivity issue in extensionsValidForV0 and the missing worktreeConfig support in builtinExtensions.
Pin go-git: Revert to v5.16.5 until upstream is fixed (loses the security fixes from the bump).
Activity
migmartri commentedon Mar 30, 2026
Root Cause Analysis
The go-git v5.17.0 release introduced strict extension validation in go-git/go-git#1861. This validation has a case-sensitivity bug that causes it to reject the
worktreeConfigextension.The bug in go-git
In
repository_extensions.go:extensions()function lowercases all extension names viastrings.ToLower(opt.Key)→ produces"worktreeconfig"extensionsValidForV0allowlist uses mixed case:"worktreeConfig"extensionsValidForV0["worktreeconfig"]misses the"worktreeConfig"entry → extension appears unsupportedFor repos with
repositoryFormatVersion=1(standard when usinggit worktree),worktreeConfigalso isn't inbuiltinExtensionsat all, so it fails via theErrUnknownExtensionpath regardless.The chain in Chainloop
pkg/attestation/crafter/crafter.go:318—gracefulGitRepoHeadcallsgit.PlainOpenWithOptionsverifyExtensionsduring open, which rejectsworktreeConfigFix options
gracefulGitRepoHead— it already degrades gracefully for missing repos/refs (returns nil). The unknown/unsupported extension errors should get the same treatment so attestation can proceed without git metadata.extensionsValidForV0and the missingworktreeConfigsupport inbuiltinExtensions.fix: revert go-git to v5.16.5 and handle extension errors gracefully