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.
Selected when
Section titled “Selected when”Always.
Checks
Section titled “Checks”osv-scanner
Section titled “osv-scanner”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.
What to do
Section titled “What to do”Upgrade the package to a fixed version that the finding names, and update the lockfile.
Example
Section titled “Example”A locked package version named in an OSV advisory reports a finding. Upgrade to a fixed version, and update the lockfile.
Turn it off
Section titled “Turn it off”gspot ignore dependencies/osv-scanner --paths "<path>" --reason "<why>"gspot ignore dependencies/osv-scanner --rule <rule> --reason "<why>"syncpack
Section titled “syncpack”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.
What to do
Section titled “What to do”Set every package.json to the same version of the dependency, then update the lockfile.
Example
Section titled “Example”Two package.json files that pin different versions of one dependency report a mismatch. Set both to the same version, and update the lockfile.
Turn it off
Section titled “Turn it off”gspot ignore dependencies/syncpack --paths "<path>" --reason "<why>"gspot ignore dependencies/syncpack --rule <rule> --reason "<why>"lockfiles
Section titled “lockfiles”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.
What to do
Section titled “What to do”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.
Example
Section titled “Example”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.
Lint rules
Section titled “Lint rules”| 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. |
Turn it off
Section titled “Turn it off”gspot ignore dependencies/lockfiles --paths "<path>" --reason "<why>"gspot ignore dependencies/lockfiles --rule host --reason "<why>"stale-lockfile
Section titled “stale-lockfile”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.
What to do
Section titled “What to do”Run the install of the package manager, and commit the lockfile it writes.
Example
Section titled “Example”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.
Turn it off
Section titled “Turn it off”gspot ignore dependencies/stale-lockfile --paths "<path>" --reason "<why>"package-manager-pin
Section titled “package-manager-pin”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.
What to do
Section titled “What to do”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.
Example
Section titled “Example”A packageManager of bun@1.4.2 while mise.toml pins bun = "1.4.3" reports package-manager-pin. Write one version in both.
Lint rules
Section titled “Lint rules”| 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. |
Turn it off
Section titled “Turn it off”gspot ignore dependencies/package-manager-pin --paths "<path>" --reason "<why>"gspot ignore dependencies/package-manager-pin --rule package-manager-pin --reason "<why>"Settings
Section titled “Settings”| 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. |
Rules for coding agents
Section titled “Rules for coding agents”| Rule file | Installed when |
|---|---|
.gspot/rules/DEPENDENCIES.md |
Always |
Tools and versions
Section titled “Tools and versions”| Tool | Version |
|---|---|
| osv-scanner | 2.7.0 |
| syncpack | 15.3.3 |
Files gspot writes
Section titled “Files gspot writes”.gspot/configurations/dependencies/osv-scanner.toml and .gspot/configurations/dependencies/syncpack.json