Skip to main content
Wright Websites

license-sentinel

enforce licence policy

Check production dependencies against an allowed licence policy.

  • 69/week on npm
  • 2★
  • MIT
  • v1.1.0
  • In use on this site
  • Supply Chain
npx license-sentinel

Read the full README on GitHub (opens in a new tab)View on npm (opens in a new tab)

license-sentinel

From the README

license-sentinel reads every installed dependency (from nodemodules or the npm, pnpm and yarn lockfiles), works out each package's license from package.json and the LICENSE file text, parses SPDX expressions and checks the result against your policy and your project's own license. GPL in an MIT project, AGPL anywhere, UNLICENSED, missing and unrecognised licenses are reported with a severity and a concrete fix. The same run can write a CycloneDX 1.6 SBOM (validated in CI against the official schema), an SPDX 2.3 SBOM, CSV/HTML/Markdown attribution output, and a third-party NOTICES** file.

npx license-sentinel                                  # audit the current project (production deps)
npx license-sentinel --preset permissive --fail-on medium
npx license-sentinel --deny "GPL-*,AGPL-*,SSPL-1.0" --include-dev
npx license-sentinel --source lockfile --registry      # no node_modules: use the lockfile + npm registry
npx license-sentinel --cyclonedx bom.cdx.json --spdx bom.spdx.json --notices THIRD_PARTY_NOTICES.txt
npx license-sentinel --omit=dev --csv licenses.csv --html attribution.html

Where we use it

CI job on this site: install · audit:deps · In use

Related service: Web hosting

Related packages

Supply Chain