# install
go install golang.org/x/vuln/cmd/govulncheck@latest
# Run
govulncheck -mode=source -scan=symbol -test ./...
Example output:
Scanning your code and 293 packages across 44 dependent modules for known vulnerabilities...
=== Informational ===
Found 1 vulnerability in packages that you import, but there are no call
stacks leading to the use of this vulnerability. You may not need to
take any action. See https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck
for details.
Vulnerability #1: GO-2023-2163
curve KeyPairs fail to encrypt github.com/nats-io/nkeys
More info: https://pkg.go.dev/vuln/GO-2023-2163
Module: github.com/nats-io/nkeys
Found in: github.com/nats-io/nkeys@v0.4.0
Fixed in: github.com/nats-io/nkeys@v0.4.6
No vulnerabilities found.
Share feedback at https://go.dev/s/govulncheck-feedback.
Summary
In https://github.com/exasol/python-toolbox/pull/88 we added support for creating issues for vulnerabilities in Maven projects. This would be useful for Go projects, too.
Details
We can use govulncheck:
Text output
Example output:
JSON output: