check_policy
Evaluates dependency licenses against allow/deny rules and project compatibility, returning ok, needs review, or violation verdicts with reasons.
Instructions
Give each dependency a verdict - ok / needs review / violation - with reasons.
Policy comes from the arguments or from a .license-policy.toml in path (arguments win,
key by key). Entries in allow/deny are SPDX ids ('MIT', 'GPL-2.0' is read as GPL-2.0-only),
wildcards ('BSD-*'), or category names: public-domain, permissive, weak-copyleft,
strong-copyleft, network-copyleft, source-available, noncommercial, restricted, proprietary.
The TOML file may also hold project_license = "..." and an [exceptions] table mapping
a package name (or name@version) to the reason you accepted it.
Rules: deny beats allow; with an allow list, anything known and not on it is a violation;
otherwise, if project_license is given, each dependency is judged by the compatibility
table (compatible = ok, conditional = needs review, incompatible = violation); with
neither, permissive licenses are ok, weak copyleft (LGPL/MPL/EPL) needs review with linking
notes, and strong/network copyleft, source-available and non-commercial licenses are
violations. UNKNOWN and unclassified licenses always need review. OR expressions take the
best option for you, AND expressions the worst. Same license sources as license_inventory.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deny | No | ||
| path | No | . | |
| allow | No | ||
| limit | No | ||
| online | No | ||
| python | No | ||
| show_ok | No | ||
| project_license | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |