Upgrade dependency "github.com/kube-vip/kube-vip"
Ben131-Go opened this issue · 0 comments
Background
Repo github.com/vmware-tanzu/cluster-api-provider-bringyourownhost
depends on github.com/kube-vip/kube-vip@v0.5.5
.
https://github.com/vmware-tanzu/cluster-api-provider-bringyourownhost/blob/main/go.mod#L16
However, comparing version v0.5.5
of github.com/kube-vip/kube-vip
from proxy.golang.org and github, there are inconsistencies.
"committer": {
"name": "GitHub",
"email": "noreply@github.com",
"date": "2022-10-11T12:13:45Z"
}
{"Version":"v0.5.5","Time":"2022-10-10T15:25:16Z","Origin":{"VCS":"git","URL":"https://github.com/kube-vip/kube-vip","Ref":"refs/tags/v0.5.5","Hash":"5c859f42f5b3b30222c2c5cfc08b35669b0db2a5"}}
So the checksum from the code in github does not match the checksum saved in sum.golang.org. The v0.5.5
tag of github.com/kube-vip/kube-vip
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/kube-vip/kube-vip@v0.5.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 github.com/kube-vip/kube-vip@v0.5.5
, the following error occurs.
go: downloading github.com/kube-vip/kube-vip v0.5.5
go: github.com/kube-vip/kube-vip@v0.5.5: verifying module: checksum mismatch
downloaded: h1:0C6AdaMxRxqhMHDZFEp8Ukx7KFQ5UaqWTZp0G+yOhhc=
sum.golang.org: h1:ZtCp3417IaZtI6JLKqf3mciERyopouyW5eB5QjVQ3Bk=
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/kube-vip/kube-vip
.
Solution
1. Bump the version of dependency github.com/kube-vip/kube-vip
I would recommend bumping the version of github.com/kube-vip/kube-vip
to a new release to ensure dependency copy in proxy.golang.org and github in sync.