Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/vuln: go: -mod may only be set to readonly when in workspace mode, but it is set to "mod" error starting in 1.0.2 #65155

Closed
ldemailly opened this issue Jan 18, 2024 · 2 comments
Assignees
Labels
vulncheck or vulndb Issues for the x/vuln or x/vulndb repo

Comments

@ldemailly
Copy link

ldemailly commented Jan 18, 2024

git clone https://github.com/fortio/fortiotel.git
cd fortiotel

then:

$ go install golang.org/x/vuln/cmd/govulncheck@v1.0.1
$ govulncheck ./...
Scanning your code and 342 packages across 34 dependent modules for known vulnerabilities...

No vulnerabilities found.

Share feedback at https://go.dev/s/govulncheck-feedback.

vs

$  go install golang.org/x/vuln/cmd/govulncheck@latest
go: downloading golang.org/x/vuln v1.0.2
go: downloading golang.org/x/tools v0.17.0
go: downloading golang.org/x/sync v0.6.0
$ govulncheck ./...
govulncheck: loading modules: /opt/homebrew/bin/go list -m -json -mod=mod all: exit status 1
go: -mod may only be set to readonly when in workspace mode, but it is set to "mod"
	Remove the -mod flag to use the default readonly value,
	or set GOWORK=off to disable workspace mode.
@gopherbot gopherbot added the vulncheck or vulndb Issues for the x/vuln or x/vulndb repo label Jan 18, 2024
@gopherbot gopherbot modified the milestones: Unreleased, vuln/unplanned Jan 18, 2024
@ldemailly
Copy link
Author

Duplicate of #65130

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/556775 mentions this issue: internal/vulncheck: remove -mod=mod flag from LoadModules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vulncheck or vulndb Issues for the x/vuln or x/vulndb repo
Projects
None yet
Development

No branches or pull requests

3 participants