-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Background
Repo github.com/Creatly/craetly-backend depends on go.mongodb.org/mongo-driver@v1.4.5.
https://github.com/Creatly/creatly-backend/blob/main/go.mod#L44
However, comparing version v1.4.5 of go.mongodb.org/mongo-driver from proxy.golang.org and github, there are inconsistencies.
"committer": {
"name": "Benjamin Rewis",
"email": "benji.rewis@mongodb.com",
"date": "2021-01-19T19:46:06Z"
}{"Version":"v1.4.5","Time":"2021-01-19T19:12:43Z"}So the checksum from the code in github does not match the checksum saved in sum.golang.org. The v1.4.5 tag of go.mongodb.org/mongo-driver might have been retagged after a minor edition on github. I guess you use proxy.golang.org to get dependencies, but that also shows that your project is depending on the copy of go.mongodb.org/mongo-driver@v1.4.5 before its edition. Depending upon such inconsistent tag version may also result in some unexpected errors as well as build errors due to different proxy settings.
For example, when someone who does not use proxy.golang.org, say GOPROXY=direct, attempts to get go.mongodb.org/mongo-driver@v1.4.5, the following error occurs.
go: downloading go.mongodb.org/mongo-driver v1.4.5
go: go.mongodb.org/mongo-driver@v1.4.5: verifying module: checksum mismatch
downloaded: h1:z4/YQzLTxI+ymcrS//Wc2JBn2b9ojvpVH3BaYT8rqUc=
sum.golang.org: h1:TLtO+iD8krabXxvY1F1qpBOHgOxhLWR7XsT7kQeRmMY=
SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.
For more information, see 'go help module-auth'.So, this is a reminder in the hope that you can get rid of this problematic version of project go.mongodb.org/mongo-driver.
Solution
1. Bump the version of dependency go.mongodb.org/mongo-driver
I would recommend bumping the version of go.mongodb.org/mongo-driver to a new release to ensure dependency copy in proxy.golang.org and github in sync.