AAK-LEGAL-002: package.json declares no license
- Severity
- MEDIUM
- Category
- Legal Compliance (
legal-compliance) - Scanner
agent_audit_kit/scanners/legal_compliance.py- Auto-fixable
- No.
- SARIF name
NoLicenseDep
What it detects
A package.json in the project has no license field, so the package states no terms under which others may use it. The rule reads the project's own manifests, not the dependencies it installs.
How to fix
Add a license field to the package.json: an SPDX identifier such as MIT, or UNLICENSED for a private package that grants no rights to others.
To confirm the finding is gone, report only this rule:
agent-audit-kit scan . --rules AAK-LEGAL-002
Limitations
Reads the license key of each package.json in the scanned tree and skips node_modules, so an installed dependency with no license is not checked. Any value counts as declared, an empty string and UNLICENSED included.
References
No external references are recorded for this rule.
All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-LEGAL-002.md: the page then shows that text, with the registry reference appended under it.