Skip to content

Dependencies

gspot checks your locked packages for known vulnerabilities, and the registry hosts that your lockfiles download from:

Check Stage Level What it does
dependencies/osv-scanner push basic Looks up every locked dependency in the Open Source Vulnerabilities (OSV) advisory database.
dependencies/syncpack push all Checks that each dependency has ranges that agree across the workspace.
dependencies/lockfiles commit basic Checks that lockfile downloads use HTTPS and an allowed registry host, and that each scope holds the lockfiles of one package manager.
dependencies/stale-lockfile commit basic Checks that each package.json declares the dependencies that its npm, pnpm, or Bun lockfile records.
dependencies/package-manager-pin commit basic Checks that the package manager that package.json names, in packageManager or devEngines.packageManager, and its mise pin name one version, and that a pnpm, Yarn, or Bun project names one.

To check their licenses too, see Licenses.

Before each push that changes a lockfile, dependencies/osv-scanner reads your lockfiles and reports each package with a known vulnerability. A finding points at the line of the package in its lockfile, and names the versions that fix the vulnerability when the advisory lists them. Each run sends the names and versions of the locked packages to the Open Source Vulnerabilities (OSV) service. To keep a package that has an advisory, ignore the advisory with a reason.

The check does not read the lockfiles in .gspot/. To get fixes for the tools of gspot, upgrade gspot.

A push that changes no lockfile skips this check, so a new advisory on a version you already locked stays unreported until a push changes a lockfile. gspot adds no scheduled job to your CI. To scan on a schedule, add a workflow of your own next to .github/workflows/gspot.yml. Copy its steps up to and including Install gspot tools, set on.schedule, and end with this step, which reads every lockfile:

- run: gspot check --only dependencies/osv-scanner

By default, lockfile downloads may come from registry.npmjs.org and registry.yarnpkg.com. To allow another host, list every host, because gspot set replaces the whole list:

gspot set dependencies.allowed_registries registry.npmjs.org registry.yarnpkg.com npm.example.com --reason "<why>"

Downloads must still use HTTPS. A host allowed in a scope counts for that folder and the folders inside it.