Skip to content

fix(sbom): detect sha256 hashes in expression-form licenses in needs_fix#1911

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

fix(sbom): detect sha256 hashes in expression-form licenses in needs_fix#1911
mesutoezdil wants to merge 1 commit into
NVIDIA:mainfrom
mesutoezdil:fix/sbom-needs-fix-expression

Conversation

@mesutoezdil

@mesutoezdil mesutoezdil commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

CycloneDX allows licenses in 2 forms:

  • {"license": {"id": "MIT"}} // handled correctly
  • {"expression": "MIT OR Apache-2.0"} // not checked in needs_fix

needs_fix only looked at the license key, so components with a sha256 hash in expression form were silently skipped and never resolved.

This is the parallel fix to #1898, which fixed the same gap in extract_licenses. Adds tests covering both forms.

CycloneDX allows licenses as either {"license": {"id": "..."}} or
{"expression": "..."}. needs_fix only checked the license form, so
expression entries with sha256 hashes were silently skipped.

Add expression-form check to needs_fix, mirroring the fix in
extract_licenses (NVIDIA#1898). Add tests covering both forms.
@mesutoezdil mesutoezdil requested review from a team, derekwaynecarr and mrunalp as code owners June 15, 2026 19:41
@copy-pr-bot

copy-pr-bot Bot commented Jun 15, 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