exp/govulncheck: DefaultCache now returns an error

DefaultCache can now return an error.
Disables TestGoEnv on js/wasm which does not support "go env".
Additionally calls GoEnv lazier. GoEnv now returns an error.

Fixes golang/go#57628

Change-Id: Iced82b30de6e53556fde410c25863edd69d8206e
Reviewed-on: https://go-review.googlesource.com/c/vuln/+/460421
Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com>
Run-TryBot: Tim King <taking@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
7 files changed
tree: 85e142c730b679fc5ea42b7634cb12a4913887e4
  1. client/
  2. cmd/
  3. devtools/
  4. doc/
  5. exp/
  6. internal/
  7. osv/
  8. vulncheck/
  9. .gitignore
  10. all_test.go
  11. checks.bash
  13. go.mod
  14. go.sum
  17. README.md
  18. tools_test.go

Go Vulnerability Management

Go Reference

This repository contains packages for accessing and analyzing data from the Go Vulnerability Database. It contains the following:

  • Package client: a client for interacting with the Go vulnerability database
  • Package vulncheck: an API for detecting vulnerabilities in Go packages
  • Command govulncheck: a CLI for detecting vulnerabilities in Go packages

Check out https://go.dev/security/vuln for more information about the Go vulnerability management system.

Privacy Policy

The privacy policy for govulncheck can be found at https://vuln.go.dev/privacy.


Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.

Database entries available at https://vuln.go.dev are distributed under the terms of the CC-BY 4.0 license.