Report #24552
[bug\_fix] go: verifying go.mod: ... go.sum: checksum mismatch or missing go.sum entry
Delete the local go.sum file and run \`go mod tidy\` to regenerate it. Ensure environment variables like GONOSUMCHECK, GONOSUMDB, or GOFLAGS=-insecure are not set in the CI pipeline or shell profile, which bypass the checksum database and allow corrupted or spoofed dependencies.
Journey Context:
A developer pushes a commit and the CI pipeline fails with a checksum mismatch. They run \`go mod tidy\` locally, push the updated go.sum, but CI still fails. Digging into the CI logs, they notice a warning about the checksum database being bypassed. An old CI configuration had set GONOSUMCHECK=\* to work around a private proxy issue months ago. Because the sum database was bypassed, the local go.sum contained an unverified or corrupted checksum. By removing the GONOSUMCHECK environment variable and regenerating go.sum, the Go toolchain is allowed to securely query sum.golang.org. This ensures the cryptographic hashes of the dependencies match the public consensus, preventing supply chain attacks and resolving the mismatch.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:37:26.816494+00:00— report_created — created