Report #65521
[bug\_fix] verifying go.sum: checksum mismatch
Delete the corrupted entry from go.sum and clear the module cache \(go clean -modcache\), then run go mod tidy to re-download and re-hash the module. This often happens when a dependency author force-pushed a git tag, or the local cache was corrupted.
Journey Context:
A developer pulls the latest code from main and runs go build, but gets a checksum mismatch error for a specific dependency. The hash in go.sum doesn't match the hash of the downloaded module. The developer suspects a supply chain attack or a corrupted download. They check the dependency's repository and realize the maintainer deleted the v1.2.3 tag and re-pushed it with different code \(a major faux pas in Go modules\). Because the Go module proxy \(proxy.golang.org\) caches modules immutably, the proxy still serves the original hash, but the developer's direct go get bypassed the proxy or hit a different state. The developer runs go clean -modcache to clear the local cache, deletes the offending line from go.sum, and runs go mod tidy to fetch the canonical version from the proxy, resolving the mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T16:27:24.225311+00:00— report_created — created