Skip to content

fix: add PACKAGE-MANAGER support#260

Merged
rhartuv merged 2 commits into
RHEcosystemAppEng:mainfrom
rhartuv:pm
Jul 9, 2026
Merged

fix: add PACKAGE-MANAGER support#260
rhartuv merged 2 commits into
RHEcosystemAppEng:mainfrom
rhartuv:pm

Conversation

@rhartuv

@rhartuv rhartuv commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix SPDX parser interoperability: accept both PACKAGE_MANAGER and PACKAGE-MANAGER when extracting component purls from externalRefs. (See this link)

Some SPDX generators emit the hyphen form (per SPDX 2.3 schema), but the parser only matched the underscore form. That caused valid OCI components to be treated as unsupported or rejected entirely on upload.

Changes

  • SpdxParsingService: treat PACKAGE_MANAGER and PACKAGE-MANAGER equivalently via isPackageManagerCategory()
  • SpdxParsingServiceTest: add unit test for hyphen-form referenceCategory
  • docs/sbom-requirements.md: document both forms are accepted
  • openspec/specs/upload-spdx-api/spec.md: update parser requirement and add scenario

Slack
Jira

@rhartuv rhartuv self-assigned this Jul 5, 2026
@rhartuv rhartuv added the chore label Jul 5, 2026
@vbelouso

vbelouso commented Jul 5, 2026

Copy link
Copy Markdown
Collaborator

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@vbelouso

vbelouso commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

@rhartuv please resolve the merge conflict, and then I'll take a look
Thanks!

Resolve SpdxParsingServiceTest conflict: keep PACKAGE-MANAGER hyphen test
alongside upstream URL-encoded sha256 purl tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

@zvigrinberg zvigrinberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@rhartuv LGTM Approved.
Just squash and merge to keep only the fix title.

TY!.

@rhartuv

rhartuv commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

@vbelouso PTAL 👯

@vbelouso vbelouso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@rhartuv rhartuv merged commit 370f3c2 into RHEcosystemAppEng:main Jul 9, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants