Skip to content

dependencies

Known advisories, allowed registries, one package manager, a lockfile that matches its dependency file, and one package manager version. Level all adds one version of each package across a workspace. Guide: Dependencies.

Always.

Looks up every locked dependency in the Open Source Vulnerabilities (OSV) advisory database.

Runs at the push stage, once for the repository, and needs network access.

A locked version with an advisory ships a vulnerability that attackers can look up.

Upgrade the package to a fixed version that the finding names, and update the lockfile.

A locked package version named in an OSV advisory reports a finding. Upgrade to a fixed version, and update the lockfile.

gspot ignore dependencies/osv-scanner --paths "<path>" --reason "<why>"
gspot ignore dependencies/osv-scanner --rule <rule> --reason "<why>"

Checks that each dependency has ranges that agree across the workspace.

Runs at the push stage, only at the all level, once for the repository. It runs only in a scope that selects the javascript configuration.

Two versions of a dependency in one workspace behave differently, so a bug shows in only one package.

Set every package.json to the same version of the dependency, then update the lockfile.

Two package.json files that pin different versions of one dependency report a mismatch. Set both to the same version, and update the lockfile.

gspot ignore dependencies/syncpack --paths "<path>" --reason "<why>"
gspot ignore dependencies/syncpack --rule <rule> --reason "<why>"

Checks that lockfile downloads use HTTPS and an allowed registry host, and that each scope holds the lockfiles of one package manager.

Runs at the commit stage, once per scope.

A lockfile line from another host installs code nobody chose, and reviewers rarely read those files.

Install the package again from an allowed registry, or add the host to dependencies.allowed_registries. Keep the lockfile of one package manager, and delete the others.

A lockfile URL outside dependencies.allowed_registries reports its host. Install the package again from an allowed registry, or add that host to the list.

Rule What it checks What to do
host Each download URL of a JavaScript lockfile uses HTTPS and a host of allowed_registries. Install the package from an allowed registry, or add its host to dependencies.allowed_registries.
foreign-lockfile A scope holds the lockfile of one JavaScript package manager. Keep the lockfile of the package manager that the scope uses, and delete the others.
gspot ignore dependencies/lockfiles --paths "<path>" --reason "<why>"
gspot ignore dependencies/lockfiles --rule host --reason "<why>"

Checks that each package.json declares the dependencies that its npm, pnpm, or Bun lockfile records.

Runs at the commit stage, once per scope.

A frozen install in CI stops when package.json and the lockfile disagree, after the push has already landed.

Run the install of the package manager, and commit the lockfile it writes.

A package.json that asks for zod ^4.1.0 while bun.lock records ^4.0.0 reports stale-lockfile. Run bun install and commit the lockfile.

gspot ignore dependencies/stale-lockfile --paths "<path>" --reason "<why>"

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.

Runs at the commit stage, once per scope.

Tools that read packageManager, such as Corepack, and tools that start the mise pin then run two versions of one package manager.

Write the same version of the package manager in package.json and in mise.toml, and name the package manager of a pnpm, Yarn, or Bun project in packageManager or devEngines.packageManager.

A packageManager of bun@1.4.2 while mise.toml pins bun = "1.4.3" reports package-manager-pin. Write one version in both.

Rule What it checks What to do
package-manager-pin packageManager in package.json names the version of the package manager that mise pins. Change packageManager or the mise pin, so that both name one version.
syntax A file that the check reads parses without errors. Fix the syntax at the reported line.
gspot ignore dependencies/package-manager-pin --paths "<path>" --reason "<why>"
gspot ignore dependencies/package-manager-pin --rule package-manager-pin --reason "<why>"
Setting What it sets
dependencies.min_release_age_days How many days a package waits after its release before gspot installs it.
dependencies.allowed_registries The hosts a lockfile may resolve packages from.
dependencies.bun_scanner The npm package that Bun runs as its install security scanner. Without it, Bun runs no scanner.
Rule file Installed when
.gspot/rules/DEPENDENCIES.md Always
Tool Version
osv-scanner 2.7.0
syncpack 15.3.3

.gspot/configurations/dependencies/osv-scanner.toml and .gspot/configurations/dependencies/syncpack.json