licenses
Locked dependencies: a license on the allowed list, or an allowed-package record with a reason for one package. Guide: Licenses.
Selected when
Section titled “Selected when”You run gspot add licenses.
Checks
Section titled “Checks”allowed
Section titled “allowed”Compares the license of each locked package with the allowed list and package records, through osv-scanner.
Runs at the push stage, once per scope, with osv-scanner, and needs network access. It skips until you set licenses.allowed.
A license the project cannot accept arrives silently with a transitive dependency.
What to do
Section titled “What to do”Replace the package, or write a [[licenses.allowed_package]] record by hand with its name, version, and a reason naming the license.
Example
Section titled “Example”A dependency with a license outside licenses.allowed reports a finding for that version. Replace it, or write a [[licenses.allowed_package]] record with its name, version, and the license in a reason.
Lint rules
Section titled “Lint rules”| Rule | What it checks | What to do |
|---|---|---|
disallowed-license |
Each locked package reports a license that licenses.allowed lists. |
Replace the package, allow its license, or accept the package in a [[licenses.allowed_package]] record. |
unused-record |
Each [[licenses.allowed_package]] record matches a locked package. |
Delete the record, or fix the package name or version range that it gives. |
unmatched-ignore |
Each [[ignore]] record for licenses/allowed names a lockfile or gspot.toml in its paths. |
Name the lockfile in paths, or delete the record and accept each package in a [[licenses.allowed_package]] record. |
Turn it off
Section titled “Turn it off”gspot ignore licenses/allowed --paths "<path>" --reason "<why>"gspot ignore licenses/allowed --rule disallowed-license --reason "<why>"Settings
Section titled “Settings”| Setting | What it sets |
|---|---|
licenses.allowed |
The SPDX license IDs a dependency may report. Empty turns the check off. |
licenses.allowed_package |
Packages accepted under a license outside the list: name, version, and reason. |