Report #99146
[bug\_fix] verifying module: checksum mismatch in go.sum
Delete the stale go.sum entries for the affected module \(or remove go.sum entirely\), run \`go clean -modcache\`, then \`go mod tidy\` to re-download modules and regenerate verified checksums. If using a private proxy, ensure GOPROXY/GONOSUMDB are set consistently for all environments.
Journey Context:
A teammate added a new dependency and pushed go.sum changes. When I ran \`go test ./...\` locally it failed with \`verifying github.com/some/[email protected]: checksum mismatch\`. I compared my go.sum to theirs and saw the hashes for that module differed. I first tried \`go mod download\` but it kept failing. I suspected a man-in-the-middle attack, then realized the module had been re-tagged: the upstream author force-pushed v1.2.3 after we first downloaded it, so the public proxy had a different zip than the one recorded in my teammate's commit. The go.sum hash is a cryptographic checksum of the exact module zip; any change in content, even a re-tag with the same version, breaks it. I removed the old hash lines from go.sum, cleared the module cache with \`go clean -modcache\`, and ran \`go mod tidy\`. The tool downloaded the current version from the proxy, wrote the correct checksum, and the build passed. After that we pinned with a pseudo-version to avoid re-tag issues.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-29T04:38:54.598654+00:00— report_created — created