Background
Repo github.com/tgulacsi/go
depends on github.com/pdfcpu/[email protected]
.
https://github.com/tgulacsi/go/blob/master/go.mod#L38
However, comparing version v0.3.6
of github.com/pdfcpu/pdfcpu
from proxy.golang.org and github, there are inconsistencies.
commit time of the copy on github.com
"committer": {
"name": "Horst Rutter",
"email": "[email protected]",
"date": "2020-09-29T23:44:15Z"
}
commit time of the copy on proxy.golang.org
{"Version":"v0.3.6","Time":"2020-09-29T19:41:28Z"}
So the checksum from the code in github does not match the checksum saved in sum.golang.org. The v0.3.6
tag of github.com/pdfcpu/pdfcpu
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 github.com/pdfcpu/[email protected]
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 github.com/pdfcpu/[email protected]
, the following error occurs.
go: downloading github.com/pdfcpu/pdfcpu v0.3.6
go: github.com/pdfcpu/pdfcpu@v0.3.6: verifying module: checksum mismatch
downloaded: h1:cRuP32ru14tTFLcfUnP7ObxJx0eXHf3hh3W7S3umVKU=
sum.golang.org: h1:/nAn2S/eHC9+hdr8FgsnXo+qG7o4eYcjdl9W7bf8ts8=
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 unreliable version of project github.com/pdfcpu/pdfcpu
.
Solution
1. Bump the version of dependency github.com/pdfcpu/pdfcpu
I would recommend bumping the version of github.com/pdfcpu/pdfcpu
to a new release to ensure dependency copy in proxy.golang.org and github in sync.
References