cmd/go: "go get" fails when GOFIPS140=v1.0.0 is set #73649
Labels
BugReport
Issues describing a possible bug in the Go implementation.
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Go version
go version go1.24.3 darwin/arm64
Output of
go env
in your module/workspace:What did you do?
In any existing project (or a blank project), using go1.24 with FIPS-140-3 mode enabled using
GOFIPS140='v1.0.0'
environment, attempted to updategithub.com/open-policy-agent/opa
library, or tried getting thefieldalignment
tool (using-tool
directive).Running the following commands easily demonstrates the problem.
This doesn't happen when
GOFIPS140
env var remains unset, without itgo get
successfully adds the dependencies togo.mod
.This doesn't seem to be happening with
go install
:$ go install golang.org/x/tools/go/analysis/passes/fieldalignment/cmd/fieldalignment@latest
works as expected, no errors;
fieldalignment
binary is correctly installed into~/go/bin
.What did you see happen?
Full output for
go get -tool
command:What did you expect to see?
Expectation that dependencies are correctly added to
go.mod
same as when the FIPS-140-3 mode is not enabled:The text was updated successfully, but these errors were encountered: