Licence review v2, on top of #569: a policy that says which licences may be used, a legal review that decides the open ones, and the third-party notices a product ships.
What it does
Licence policy (GET/PUT /api/v1/licenses/policy, one document per workspace, collection license_policy): per licence category what a shipped and a build-only component needs: allow, review (a LEGAL approval) or forbid. Rules for single licences (AGPL-3.0-only forbidden) apply before the category. AND takes the strictest term, OR the least strict. A bought licence past valid_until is forbidden; one ending within the warning period (default 60 days) is announced.
The default forbids nothing. Copyleft, bought and unknown licences in shipped components need a review, so each workspace decides.
Licence check (GET /api/v1/licenses/check): counts plus the open components with their reasons. Every SBOM row also carries its verdict (policy, never stored).
Findings: after a complete SBOM (Syft ran), the scan reports, under scanner license-policy:
each forbidden or expired licence as a High finding;
all components waiting for a review as one Low finding per target.
They auto-resolve like other findings. A policy change shows in the check at once and in the findings with the next scan.
Legal review (POST/DELETE /api/v1/licenses/review): approve or reject the licence of one or more components, with an optional note.
An approval resolves a review, never a forbid.
A component nobody confirmed a licence for is confirmed as the scan found it (SPDX only), by the reviewer.
Saving the licence again in the editor drops the review.
The review shows in CycloneDX (pruefwerk:license:review) and in SPDX licenseComments.
Who decides:
The role gate gets ROLE_WRITES: LEGAL may write on exactly these three routes (policy PUT, review POST/DELETE) and stays read-only everywhere else.
The handlers allow LEGAL, IT_ADMIN and support; USER and CXO get 403.
This changes the 2026-09-30 role table on purpose (documented in role_gate.rs).
Shipped components grouped by licence, with their copyright lines.
SPDX licences link to spdx.org; the workspace's own licences print their stored text.
Components without a licence are listed at the end.
The evidence pack gains THIRD-PARTY-NOTICES.txt and license-check.json.
API keys:sbom.read reaches check, policy GET and notices.
MCP:
New license_check and get_third_party_notices.
get_sbom and list_sbom_packages now carry the confirmed licences; before this they showed only what was detected.
Dashboard, SBOM → Lizenzen:
a "Lizenzprüfung" card: summary, the open list with approve/reject/undo (single and bulk), "Richtlinie" (compact dialog: kind × shipped/build, single-licence rules, warning days), "Drittanbieter-Hinweise" download;
list rows show Nicht erlaubt / Zur Prüfung and freigegeben / abgelehnt.
Unit tests cover the policy evaluation (categories, licence rules, AND/OR, build-only, expiry, approve/reject), the notices, the review handler, the scan findings (stable fingerprints), the evidence pack file list, and router tests for LEGAL on the decision routes. Clippy and tests run in CI (not locally).
Licence review v2, on top of #569: a policy that says which licences may be used, a legal review that decides the open ones, and the third-party notices a product ships.
## What it does
- **Licence policy** (`GET/PUT /api/v1/licenses/policy`, one document per workspace, collection `license_policy`): per licence category what a **shipped** and a **build-only** component needs: *allow*, *review* (a LEGAL approval) or *forbid*. Rules for single licences (`AGPL-3.0-only` forbidden) apply before the category. `AND` takes the strictest term, `OR` the least strict. A bought licence past `valid_until` is forbidden; one ending within the warning period (default 60 days) is announced.
- The **default forbids nothing**. Copyleft, bought and unknown licences in shipped components need a review, so each workspace decides.
- **Licence check** (`GET /api/v1/licenses/check`): counts plus the open components with their reasons. Every SBOM row also carries its verdict (`policy`, never stored).
- **Findings**: after a complete SBOM (Syft ran), the scan reports, under scanner `license-policy`:
- each forbidden or expired licence as a High finding;
- all components waiting for a review as one Low finding per target.
- They auto-resolve like other findings. A policy change shows in the check at once and in the findings with the next scan.
- **Legal review** (`POST/DELETE /api/v1/licenses/review`): approve or reject the licence of one or more components, with an optional note.
- An approval resolves a *review*, never a *forbid*.
- A component nobody confirmed a licence for is confirmed as the scan found it (SPDX only), by the reviewer.
- Saving the licence again in the editor drops the review.
- The review shows in CycloneDX (`pruefwerk:license:review`) and in SPDX `licenseComments`.
- **Who decides:**
- The role gate gets `ROLE_WRITES`: **LEGAL may write on exactly these three routes** (policy PUT, review POST/DELETE) and stays read-only everywhere else.
- The handlers allow LEGAL, IT_ADMIN and support; USER and CXO get 403.
- This changes the 2026-09-30 role table on purpose (documented in `role_gate.rs`).
- **Third-party notices** (`GET /api/v1/sbom/notices?repo_id=&format=text|markdown&build_only=`):
- Shipped components grouped by licence, with their copyright lines.
- SPDX licences link to spdx.org; the workspace's own licences print their stored text.
- Components without a licence are listed at the end.
- The evidence pack gains `THIRD-PARTY-NOTICES.txt` and `license-check.json`.
- **API keys:** `sbom.read` reaches check, policy GET and notices.
- **MCP:**
- New `license_check` and `get_third_party_notices`.
- `get_sbom` and `list_sbom_packages` now carry the confirmed licences; before this they showed only what was detected.
- **Dashboard, SBOM → Lizenzen:**
- a "Lizenzprüfung" card: summary, the open list with approve/reject/undo (single and bulk), "Richtlinie" (compact dialog: kind × shipped/build, single-licence rules, warning days), "Drittanbieter-Hinweise" download;
- list rows show *Nicht erlaubt* / *Zur Prüfung* and *freigegeben* / *abgelehnt*.
- **Docs:** `docs/guide/sbom.md`, `docs/features/mcp-server.md`.
## Tested
Unit tests cover the policy evaluation (categories, licence rules, AND/OR, build-only, expiry, approve/reject), the notices, the review handler, the scan findings (stable fingerprints), the evidence pack file list, and router tests for LEGAL on the decision routes. Clippy and tests run in CI (not locally).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
- Licence policy per workspace: per licence category what a shipped and a
build-only component needs (allow / review / forbid), rules for single
licences, and how early a bought licence's end is announced. The default
forbids nothing and asks for a review of copyleft, bought and unknown
licences in shipped components.
- Licence check (GET /api/v1/licenses/check) and a verdict on every SBOM row;
scans turn forbidden and ended licences into findings and list what waits
for a review in one finding per target.
- Legal review: LEGAL (also IT_ADMIN and support) approves or rejects a
component's licence (POST/DELETE /api/v1/licenses/review); an approval
resolves a review, never a ban. Saving the licence again drops the review.
The role gate lets LEGAL write on the policy and review routes only.
- Third-party notices (GET /api/v1/sbom/notices, text or markdown), in the
evidence pack with license-check.json.
- MCP: license_check and get_third_party_notices; get_sbom and
list_sbom_packages now carry the confirmed licences.
- Dashboard: licence check card with approve/reject (single and bulk), the
policy dialog, the notices download and policy/review badges in the list.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Licence review v2, on top of #569: a policy that says which licences may be used, a legal review that decides the open ones, and the third-party notices a product ships.
What it does
GET/PUT /api/v1/licenses/policy, one document per workspace, collectionlicense_policy): per licence category what a shipped and a build-only component needs: allow, review (a LEGAL approval) or forbid. Rules for single licences (AGPL-3.0-onlyforbidden) apply before the category.ANDtakes the strictest term,ORthe least strict. A bought licence pastvalid_untilis forbidden; one ending within the warning period (default 60 days) is announced.GET /api/v1/licenses/check): counts plus the open components with their reasons. Every SBOM row also carries its verdict (policy, never stored).license-policy:POST/DELETE /api/v1/licenses/review): approve or reject the licence of one or more components, with an optional note.pruefwerk:license:review) and in SPDXlicenseComments.ROLE_WRITES: LEGAL may write on exactly these three routes (policy PUT, review POST/DELETE) and stays read-only everywhere else.role_gate.rs).GET /api/v1/sbom/notices?repo_id=&format=text|markdown&build_only=):THIRD-PARTY-NOTICES.txtandlicense-check.json.sbom.readreaches check, policy GET and notices.license_checkandget_third_party_notices.get_sbomandlist_sbom_packagesnow carry the confirmed licences; before this they showed only what was detected.docs/guide/sbom.md,docs/features/mcp-server.md.Tested
Unit tests cover the policy evaluation (categories, licence rules, AND/OR, build-only, expiry, approve/reject), the notices, the review handler, the scan findings (stable fingerprints), the evidence pack file list, and router tests for LEGAL on the decision routes. Clippy and tests run in CI (not locally).
🤖 Generated with Claude Code