Snyk helps you find, fix and monitor for known vulnerabilities in your dependencies, both on an ad hoc basis and as part of your CI (Build) system.
| ℹ️ This repository is only a plugin to be used with the Snyk CLI tool. To use this plugin to test and fix vulnerabilities in your project, install the Snyk CLI tool first. Head over to snyk.io to get started. |
|---|
This plugin provides dependency metadata for Golang projects that use dep (and have a Gopkg.lock file), or govendor (and have a vendor/vendor.json file).
When upgrading from v1 to v2 of this plugin, note that PackageURL information will be present by default when invoking the inspect() function.
{
"name": "golang.org/x/exp/slices"
"version": "#2e198f4a06a1"
+ "purl": "pkg:golang/golang.org/x/exp@v0.0.0-20230522175609-2e198f4a06a1#slices"
}To disable this behaviour, it can be turned off through the options passed to the function:
const result = await inspect(
process.cwd(),
"go.mod",
- {},
+ { configuration: { includePackageUrls: false } },
)