fix(sbom): SPDX licences are declared, and copyleft is found by SPDX id #545

Merged
sharang merged 1 commits from fix/sbom-licence-declared-copyleft into main 2026-10-09 13:57:48 +00:00
Owner

The two follow-ups from #543.

  • SPDX export: licenseDeclared holds the licence (an SPDX expression, or NOASSERTION with the text in licenseComments), and licenseConcluded is always NOASSERTION. Licences stay declared: nothing is concluded without our own licence review (decided 2026-10-06, BSI TR-03183-2). CycloneDX already marked them acknowledgement: declared.
  • Copyleft check (GET /sbom/licenses summary): new compliance_core::spdx_license::is_copyleft compares every term of the licence's SPDX form, so GNU Lesser General Public License v2.1, GPL-2.0+ and MIT OR GPL-3.0-only are flagged. Same licence set as before (GPL, AGPL, LGPL, MPL-2.0) plus LGPL-2.0. A name the table does not know still falls back to the old substring check. The agent's own COPYLEFT_LICENSES list is gone.

Tests: copyleft_is_found_in_names_ids_and_expressions, known_license_names_are_exported_as_spdx_ids (updated), the vex_schemas suite (7 pass). Clippy (-D warnings) for core and agent, fmt.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

The two follow-ups from #543. - **SPDX export:** `licenseDeclared` holds the licence (an SPDX expression, or NOASSERTION with the text in `licenseComments`), and `licenseConcluded` is always `NOASSERTION`. Licences stay declared: nothing is concluded without our own licence review (decided 2026-10-06, BSI TR-03183-2). CycloneDX already marked them `acknowledgement: declared`. - **Copyleft check** (`GET /sbom/licenses` summary): new `compliance_core::spdx_license::is_copyleft` compares every term of the licence's SPDX form, so `GNU Lesser General Public License v2.1`, `GPL-2.0+` and `MIT OR GPL-3.0-only` are flagged. Same licence set as before (GPL, AGPL, LGPL, MPL-2.0) plus LGPL-2.0. A name the table does not know still falls back to the old substring check. The agent's own `COPYLEFT_LICENSES` list is gone. Tests: `copyleft_is_found_in_names_ids_and_expressions`, `known_license_names_are_exported_as_spdx_ids` (updated), the `vex_schemas` suite (7 pass). Clippy (`-D warnings`) for core and agent, fmt. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-10-09 13:41:50 +00:00
fix(sbom): SPDX licences are declared, and copyleft is found by SPDX id
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 11m13s
3ef7b2ac4a
SPDX export: the licence goes into licenseDeclared, and licenseConcluded is
NOASSERTION. Licences are what the supplier declares; nothing is concluded
without a licence review of our own (decided 2026-10-06, BSI TR-03183-2).

Copyleft check in the SBOM licence summary: each term of the licence's SPDX
form (the shared table from #543) is compared, so "GNU Lesser General Public
License v2.1" or "MIT OR GPL-3.0-only" is flagged. A name the table does not
know is still flagged when it contains a copyleft id, as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit 6f1172589e into main 2026-10-09 13:57:48 +00:00
Sign in to join this conversation.