Skip to content

License Watch

License Watch keeps an inventory of a project's open-source dependencies and checks their licenses against a policy. It flags licenses that do not fit a commercial product, such as GPL or proprietary terms, and keeps watching as the dependency tree and the registries change. Open it from the project's tab bar: More → License Watch.

How dependencies get in

  • Automatically, from sessions. Whenever an agent commits a change to a dependency manifest in your project, that manifest is scanned. A commit that changes several manifests of one ecosystem scans one of them: a lockfile before a plain manifest, and among equals the one nearest the repository root.
  • From CI or a git hook, through the API. Post the manifest to the scan endpoint, for example as a CI step after dependency installation:
jq -n --rawfile content package-lock.json \
  '{ecosystem: "npm", filename: "package-lock.json", content: $content}' |
curl -X POST "https://api.example.com/api/v1/projects/$PROJECT_ID/licensewatch/scan" \
  -H "Authorization: Bearer crios_pat_xxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  --data-binary @-

The body has three fields: ecosystem (npm, pypi, cargo, or go), filename (for example package-lock.json), and content, the file itself, up to 8 MiB. The token needs full access or the projects:write scope, and its owner needs editor access to the project; see the REST API for tokens. The response summarizes the scan: dependency counts, how many licenses resolved and how many are pending, and the finding counts.

Each scan replaces the project's inventory for that ecosystem, so always send the complete manifest.

Supported manifests

Ecosystem Files What you get
npm package-lock.json (lockfile versions 1 to 3) or package.json The lockfile gives the full transitive tree with pinned versions, and any license data it embeds. package.json gives direct dependencies only; each version range resolves to the highest matching version.
PyPI requirements.txt name==version pins resolve exactly; looser specifiers and bare names resolve to the latest release. Option lines such as -r and -e are skipped.
Cargo Cargo.lock The full tree with pinned versions. The lockfile does not record which dependencies are direct, so all are listed as transitive.
Go go.mod The inventory, with its direct and indirect split. The Go module proxy publishes no license data, so every Go dependency is reported as unknown rather than guessed.

How licenses are resolved

Licenses come from the public registries (npm, PyPI, and crates.io), or from the lockfile when it carries them. Registry text is normalized to SPDX identifiers: "Apache 2.0" becomes Apache-2.0, and "MIT/Apache-2.0" becomes MIT OR Apache-2.0. Answers are cached across all projects on the deployment, so a package already looked up costs no new registry call.

A scan resolves a bounded number of packages while you wait; the rest are shown as Resolving… and a background process finishes them. The scan starts the next batch of this project's packages at once, and so does Resolve now; the background process works through every project on its own schedule. A lookup that fails shows Retry queued and is retried after an hour; a package with No license info is checked again after a week, in case its metadata was fixed.

Note

Resolution needs outbound access from the platform to registry.npmjs.org, pypi.org, and crates.io. On an air-gapped installation, licenses stay unresolved.

Risk tiers

Every license falls into a risk tier, judged from the point of view of a commercial product:

Tier Examples
Permissive MIT, BSD, Apache-2.0, ISC, Zlib, CC0-1.0
Weak copyleft LGPL, MPL-2.0, EPL, EUPL, CDDL
Copyleft GPL, AGPL, OSL-3.0, CC-BY-SA
Restricted SSPL-1.0, BUSL-1.1, Elastic-2.0, Commons Clause, non-commercial Creative Commons, proprietary and UNLICENSED
Unknown No license information, or text that is not a recognized license

For a license expression, OR takes the friendliest option (you may pick either license) and AND the strictest (all obligations apply).

The license policy

Each project has one policy, under License policy at the bottom of the page:

  • Policy enabled: with the policy off, License Watch keeps the inventory but raises no findings.
  • Deny copyleft licenses: copyleft dependencies are critical findings.
  • Warn on weak-copyleft licenses: weak-copyleft dependencies are warnings.
  • Flag unknown licenses: dependencies without license information are warnings.
  • Denied license ids, Warned license ids, and Allowed license ids: your own SPDX lists, comma- or space-separated, up to 100 entries each.

A project that has never saved a policy uses the default, which fits a commercial product: everything above switched on and the three lists empty. Save policy re-evaluates every finding at once.

For each license in a dependency's license expression, the first matching rule wins:

  1. A license on the allowed list: no finding. The allowed list is how you accept a license on purpose.
  2. A license on the denied list: critical Denied license.
  3. A Restricted license: critical Denied license, always.
  4. A Copyleft license, with Deny copyleft licenses on: critical Denied license.
  5. A license on the warned list: a warning, Weak copyleft when the license is weak copyleft and Warned license otherwise.
  6. A Weak copyleft license, with Warn on weak-copyleft licenses on: warning Weak copyleft.

The results then combine like the risk tiers: an OR expression takes its friendliest option and an AND its strictest. So allowing MIT does not clear MIT AND GPL-3.0-only, whose GPL part still applies, and denying GPL-3.0-only does not flag MIT OR GPL-3.0-only, because you may use it under MIT. When no recognized license decides the result, the license text as a whole is judged, so free text such as "GNU General Public License v3" still counts as copyleft. A dependency with no license information at all is a warning Unknown license when Flag unknown licenses is on.

Tip

Go dependencies are always unknown, so with Flag unknown licenses on, every Go module is a warning. Acknowledge them once you have checked them.

Findings

The top of the page summarizes the project: whether the policy is on, Open findings (with the number of them that are critical), Watched dependencies, Pending resolutions, and Last scan.

The Findings table shows each finding's Severity (Critical or Warning), Kind, Package, License, and when it was first and last seen. Its tabs are Open (findings nobody has acknowledged yet), Acknowledged, and Resolved; the Open findings count and its critical number cover the Open tab.

  • Acknowledge records that someone has looked at a finding and accepts it; it stays acknowledged when the project is scanned again. Reopen undoes that.
  • Acknowledge all does the same for every finding the Open tab lists, and shows when there is more than one. It asks first, saying how many findings you are accepting and how many of them are critical. A finding that a scan opens while you decide is not included: it stays open. Everything you accepted is under Acknowledged, where you can reopen any of it.
  • Findings resolve themselves. When the dependency leaves the tree, its license metadata is fixed, or the policy no longer objects, the finding moves to Resolved. If the condition comes back, the finding reopens. A resolved finding cannot be reopened by hand.

Dependencies and scans

The Dependencies table lists the watched tree with each package's version (and the declared range, for package.json scans), whether it is Direct or Transitive, its license, its risk tier, and its resolution status. Filter by ecosystem (All ecosystems), by risk (All risks), or by name.

Recent scans lists the latest scans: when, which ecosystem and manifest, and how many dependencies were found, resolved, and still pending.

Who can do what

Everyone who can view the project can see License Watch. Scanning, acknowledging and reopening findings, Resolve now, and changing the policy need editor access. See sharing.

Self-hosted operators can tune the background resolution with orchestrator environment variables: CRIOS_LICENSEWATCH_TICK_SEC (how often it runs, default 1800 seconds), CRIOS_LICENSEWATCH_BATCH (packages per run, default 200), and CRIOS_LICENSEWATCH_INLINE_RESOLVE (lookups during a scan, default 300).