Skip to content

Add SPDX license metadata to generated SBOM packages - #13

Merged
masc2023 merged 2 commits into
eclipse-score:mainfrom
umaucher:um_spdx-license-metadata
Sep 25, 2026
Merged

masc2023 merged 2 commits into
eclipse-score:mainfrom
umaucher:um_spdx-license-metadata

Conversation

@umaucher

Copy link
Copy Markdown
Contributor

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

Validation:

  • bazel run //tools:copyright-check
  • bazel test --lockfile_mode=error //tools:format.check
  • bazel test --lockfile_mode=error //tests:test_spdx_formatter
  • gitlint --config /tmp/score.gitlint --commits HEAD

Ensure component license declarations reach SPDX output, and default SCORE dependencies to Apache-2.0 when no license metadata is available.
@umaucher
umaucher force-pushed the um_spdx-license-metadata branch from b1b9a17 to 3c69be1 Compare September 23, 2026 15:07
@umaucher
umaucher marked this pull request as ready for review September 23, 2026 15:09
@masc2023
masc2023 requested a lite review from Copilot September 23, 2026 15:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

Open (1)
What changed in this PR

Adds SPDX license metadata propagation and Apache-2.0 fallbacks for SCORE packages.

Changes:

  • Adds component_license to 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.

Comment thread defs.bzl
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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2ebe5d0.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Explicit root licenses may be overridden by the fallback, and key propagation paths lack test coverage.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)

Comment on lines +49 to +51
component_license = _default_score_license(
component_name, config.get("component_license", "")
)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2ebe5d0; Bazel tests pass.

@masc2023
masc2023 merged commit d339609 into eclipse-score:main Sep 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants