Check go.mod for vulnerable dependencies

Upload or paste your go.mod. We check every Go package version in it against OSV.dev and email you the vulnerable ones, the version that fixes them and the Go modules command to upgrade. Free, and no account needed.

or paste its content

Needed when you paste. package.json and pyproject.toml only have version ranges: use the lockfile next to them.

Only package names and versions are checked; the file itself is not kept. We use your email to send this report and nothing else unless you tick the box above. Privacy policy.

About go.mod

go.mod lists the modules your module requires, with their versions. Since Go 1.17 it also lists the indirect ones (marked // indirect), so it records the versions your build uses.

To write or refresh it:

go mod tidy

go.sum, next to it, holds checksums; it is not needed for this check.

Good to know

  • Advisories for the Go standard library depend on your Go version, which this check does not know: keep your Go toolchain up to date as well.
  • Each go.mod in a repository is its own module: check each one.

Fixing a vulnerable package

The report gives the fixed version for each vulnerable package (FIXED below). With Go modules:

# Upgrade one module
go get example.com/module@vFIXED
# Tidy go.mod and go.sum
go mod tidy

go get works the same way for an indirect module: Go then records the newer version in go.mod.

Then run your tests and commit the updated go.mod.

govulncheck ./... and this check

govulncheck, from the Go team, goes further: it checks whether your code actually calls the vulnerable functions. This check is quicker to run (nothing to install) and works for your other languages too.

Other lockfiles

Last updated .