Skip to content

fix(sbom): handle SPDX expression licenses in extract_licenses#1898

Open
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:fix/sbom-csv-expression-license
Open

fix(sbom): handle SPDX expression licenses in extract_licenses#1898
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:fix/sbom-csv-expression-license

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

CycloneDX allows licenses in 2 forms:

{"license": {"id": "MIT"}}; handled correctly

{"expression": "MIT OR Apache-2.0"}; silently dropped

extract_licenses only checked for the license key, so any component
using the expression form got an empty license field in the CSV output.

Add a check for expression before falling back to the license block.

CycloneDX allows licenses as either {"license": {"id": "..."}} or
{"expression": "MIT OR Apache-2.0"}. The expression form was silently
dropped, producing an empty license field in the CSV output.
@mesutoezdil mesutoezdil requested review from a team, derekwaynecarr and mrunalp as code owners June 13, 2026 10:42
@copy-pr-bot

copy-pr-bot Bot commented Jun 13, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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.

1 participant