Report #13687
[bug\_fix] go: verifying github.com/example/[email protected]: go.sum has unexpected checksum
Delete the specific entry for the module from go.sum and run \`go mod tidy\` to re-download and correctly record the checksum, or investigate if a proxy or corporate firewall is serving a different artifact.
Journey Context:
A team merges a feature branch into main and encounters a checksum mismatch during CI. The build fails with 'go.sum has unexpected checksum'. The developer assumes the dependency was compromised or corrupted, leading to a security scare. They clear the entire module cache \(\`go clean -modcache\`\) and re-run, but the error persists. The rabbit hole involves checking the git history for go.sum changes. They discover that a merge conflict in go.sum was resolved incorrectly, leaving a stale or mismatched checksum for a dependency that was actually updated or re-fetched with a different underlying go version or proxy. The root cause is that the go.sum file contains cryptographic hashes of the module's zip file and go.mod file. If the recorded hash doesn't match the downloaded artifact, Go refuses to build to ensure supply chain security. The fix is to remove the offending lines from go.sum and let \`go mod tidy\` recalculate the correct hashes based on the actual resolved dependencies, ensuring no malicious code was slipped in during the merge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:24:42.175055+00:00— report_created — created