note-maps icon indicating copy to clipboard operation
note-maps copied to clipboard

Upgrade dependency "github.com/textileio/go-threads"

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

Background

Repo github.com/google/note-maps depends on github.com/textileio/[email protected].
https://github.com/google/note-maps/blob/main/go.mod#L15
However, comparing version v1.0.2 of github.com/textileio/go-threads from proxy.golang.org and github, there are inconsistencies.

commit time of the copy on github.com

"committer": {
      "name": "GitHub",
      "email": "[email protected]",
      "date": "2020-12-01T22:14:02Z"
    }

commit time of the copy on proxy.golang.org

{"Version":"v1.0.2","Time":"2020-12-01T16:30:47Z"}

So the checksum from the code in github does not match the checksum saved in sum.golang.org. The v1.0.2 tag of github.com/textileio/go-threads might have been retagged after a minor edition. Depending upon such inconsistent tag version may 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 to download dependencies attempts to get github.com/textileio/[email protected], the following errors occur.

go: downloading github.com/textileio/go-threads v1.0.2
go: github.com/textileio/[email protected]: verifying module: checksum mismatch
        downloaded: h1:hrANmqXMuWFEpASIeAYiDU4m6X2b6bxVeeA48XYjTT4=
        sum.golang.org: h1:iYUA/E9gx9ALpYNYSCwKGhV3yOjxf6QtLliRitnsFSk=

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'.

It is unwise to depend on such tag releases.

Solution

1. Bump the version of dependency github.com/textileio/go-threads

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

References

Ben131-Go avatar Jan 29 '23 08:01 Ben131-Go