Skip to content

cmd/go: go get ignores go.mod from remote repo, can escalate into a security vuln #38196

@karalabe

Description

@karalabe

Happens with all Go versions ever supporting modules.


Repro: run outside of a Go module, I just want to install a Go binary:

go install -v github.com/ethereum/go-ethereum/cmd/geth

What happens:

go/src/github.com/ethereum/go-ethereum/metrics/influxdb/influxdb.go:10:2: cannot find package "github.com/influxdata/influxdb/client" in any of:
	/opt/google/go/src/github.com/influxdata/influxdb/client (from $GOROOT)
	/tmp/go/src/github.com/influxdata/influxdb/client (from $GOPATH)

Why? Because Go flat out ignores the module file distributed in that repo; and upstream nuked their repository to pieces so there's no code there any more.


Doing it manually works:

$ git clone https://github.com/ethereum/go-ethereum
$ cd go-ethereum
$ go install ./cmd/geth

This is apparently the same bug that was a release blocker in Go 1.12, and then just ignored and locked: #24250

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeGoCommandcmd/goNeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions