Repository navigation
Add SPDX license metadata to generated SBOM packages - #13
Merged
Merged
Conversation
Ensure component license declarations reach SPDX output, and default SCORE dependencies to Apache-2.0 when no license metadata is available.
umaucher
force-pushed
the
um_spdx-license-metadata
branch
from
September 23, 2026 15:07
b1b9a17 to
3c69be1
Compare
umaucher
marked this pull request as ready for review
September 23, 2026 15:09
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Resolve the license conclusion semantics issue and add the requested documentation and end-to-end coverage.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Adds SPDX license metadata propagation and Apache-2.0 fallbacks for SCORE packages.
Changes:
- Adds
component_licenseto the Bazel API and generator configuration. - Emits declared license metadata in SPDX output.
- Adds tests for defaults and explicit license overrides.
| File | Description |
|---|---|
tests/test_spdx_formatter.py |
Tests license defaults and overrides. |
internal/rules.bzl |
Adds the rule attribute and generator configuration. |
internal/generator/spdx_formatter.py |
Emits root and dependency license metadata. |
defs.bzl |
Exposes component_license in the public macro. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| PURL namespace falls back to ``eclipse-score``. | ||
| component_name: Main component name (defaults to rule name) | ||
| component_version: Component version string | ||
| component_license: SPDX license for the main component |
Comment on lines
+49
to
+51
| component_license = _default_score_license( | ||
| component_name, config.get("component_license", "") | ||
| ) |
masc2023
approved these changes
Sep 25, 2026
1 of 10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Propagates declared component licenses into generated SPDX output and assigns Apache-2.0 to SCORE packages whose license metadata is absent.
Validation: