SKY-SCA-LIC001 · Supply chain and agent configuration
Dependency licence not allowed by your policy
A licence policy lists the open-source licences your project may or may not ship. SKY-SCA-LIC001 reports a dependency whose declared licence is on your deny list (license_deny), or missing from your allow list (license_allow) when you set one.
- Languages
- package-lock.json, npm-shrinkwrap.json, installed node_modules and Python packages
- Quality gate
- counted toward the gate limits (full and diff scans). Counts toward
max_dependency_vulnerabilities, which is 0 by default, so one finding fails--gate. - Needs
license_denyorlicense_allowin[tool.skylos]; without either the rule does not run.- Finding type
- review
- Catalog name
- Dependency license policy violation
Why it matters
Some licences come with duties. The AGPL, for example, can require you to publish the source of a network service that uses the code. Finding such a package in a pull request is much cheaper than finding it during a customer's or an acquirer's legal review.
What Skylos flags
{ "name": "shop", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "shop", "version": "1.0.0", "dependencies": { "pm2": "5.4.2" } }, "node_modules/pm2": { "version": "5.4.2", "resolved": "https://registry.npmjs.org/pm2/-/pm2-5.4.2.tgz", "integrity": "sha256-9mFuFeUw7VUvnaotPOcZY5R8a8fJjJtk/T5nP9AmIsY=", "license": "AGPL-3.0" } }}[project]name = "shop"version = "1.0.0" [tool.skylos]license_deny = ["GPL-*", "AGPL-*"]What Skylos leaves alone
{ "name": "shop", "version": "1.0.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "shop", "version": "1.0.0", "dependencies": { "node-forge": "1.3.1" } }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha256-9mFuFeUw7VUvnaotPOcZY5R8a8fJjJtk/T5nP9AmIsY=", "license": "(BSD-3-Clause OR GPL-2.0)" } }}Why Skylos leaves it alone
node-forge mentions the GPL, but its licence is a choice: BSD-3-Clause or GPL-2.0. You can use it under BSD-3-Clause, which the policy allows, so it is not a violation. MIT AND GPL-3.0-only would be.
How Skylos decides
- Runs with
--sca(or-a) whenlicense_denyorlicense_allowis set in[tool.skylos]. It works offline. - Reads each package's declared licence from evidence it can read without running anything: the
licensefield ofpackage-lock.jsonandnpm-shrinkwrap.jsonentries, an installednode_modulespackage whose name and version match, and the metadata of an installed Python package in the project's.venvorvenv(License-Expression, thenLicense, then classifiers). Other ecosystems have no licence source. - Normalises the value to an SPDX identifier (the standard short licence names such as
MITorGPL-3.0-only) without guessing:Apache 2.0becomesApache-2.0, the deprecatedAGPL-3.0becomesAGPL-3.0-only, and vague values such asBSDorGPLv3becomeNOASSERTION, which is never reported. - A package is reported only when no choice under its licence expression avoids the policy. The deny list wins over the allow list, and globs such as
GPL-*match the whole ID, so they do not matchLGPL-*. - Skips packages listed in
license_exceptions(nameorname@version).
How to fix it
Replace the package with one under a licence your policy allows, or, if your legal team accepts this one, add it to license_exceptions with the reason recorded in the pull request.
[project]name = "shop"version = "1.0.0" [tool.skylos]license_deny = ["GPL-*", "AGPL-*"]Added: license_exceptions = ["pm2@5.4.2"]When it can be wrong
- The licence a package declares in its metadata can differ from the files it ships. Skylos reads only the declaration.
- Python packages are checked only when they are installed in the project's
.venvorvenv, or in the Python that runs Skylos, at exactly the locked version. Without an installed copy their licence isNOASSERTIONand nothing is reported. - When a Skylos Cloud policy sets any
license_*key, it replaces the repository's values, andpyproject.tomlcannot turn this rule off.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
To accept one package after review, list it in
license_exceptionsasnameorname@version. With the version, an upgrade is checked again.TOML license_exceptions = ["pm2@5.4.2"]ignore = ["SKY-SCA-LIC001"]in[tool.skylos]turns the rule off for the project.TOML [tool.skylos]license_deny = ["GPL-*", "AGPL-*"]ignore = ["SKY-SCA-LIC001"]In a file that allows
#comments, such asrequirements.txt,# skylos: ignore[SKY-SCA-LIC001]on the line that declares the package hides it. JSON lockfiles cannot hold comments; uselicense_exceptionsthere.A baseline does not hold licence findings: an upgrade does not fix a licence, so use
license_exceptionsinstead.