cfrpki icon indicating copy to clipboard operation
cfrpki copied to clipboard

Upgrade dependency "github.com/cloudflare/gortr"

Open Ben131-Go opened this issue 2 years ago • 0 comments

Background

Repo github.com/cloudflare/cfrpki depends on github.com/cloudflare/[email protected].
https://github.com/cloudflare/cfrpki/blob/master/go.mod#L6
However, comparing version v0.14.7 of github.com/cloudflare/gortr from proxy.golang.org and github, there are inconsistencies.

commit time of the copy on github.com

"committer": {
      "name": "Louis Poinsignon",
      "email": "[email protected]",
      "date": "2020-11-24T21:47:12Z"
    }

commit time of the copy on proxy.golang.org

{"Version":"v0.14.7","Time":"2020-11-23T23:41:09Z"}

So the checksum from the code in github does not match the checksum saved in sum.golang.org. The v0.14.7 tag of github.com/cloudflare/gortr 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/cloudflare/[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/cloudflare/[email protected], the following error occurs.

go: downloading github.com/cloudflare/gortr v0.14.7
go: github.com/cloudflare/[email protected]: verifying module: checksum mismatch
        downloaded: h1:YuSIN3f9tV0qDDeJhoY5cy9QcfAmfeis6K8MLSqiubs=
        sum.golang.org: h1:QlZRNa1O7heqgLk9ijwKtPigjzqvDHdPSwmSqSbiPaE=

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 github.com/cloudflare/gortr.

Solution

1. Bump the version of dependency github.com/cloudflare/gortr

I would recommend bumping the version of github.com/cloudflare/gortr to a new release to ensure dependency copy in proxy.golang.org and github in sync.

References

Ben131-Go avatar Feb 03 '23 06:02 Ben131-Go