Skip to content

Keep the wheel component unique in CycloneDX SBOMs - #752

Merged
mayeut merged 1 commit into
pypa:mainfrom
JekaK:dev-factory/issue-750
Nov 14, 2026
Merged

mayeut merged 1 commit into
pypa:mainfrom
JekaK:dev-factory/issue-750

Conversation

@JekaK

@JekaK JekaK commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Refs #750.

When repair grafts a library, the generated BOM currently declares the wheel twice with the same bom-ref. Keep the wheel in metadata.component and list only grafted libraries in components. The dependency graph still points from the wheel to those libraries.

Tested on 369e83d695b0d89fdb61d7a5671ad15bc8d13473: 7 passed in 0.08s

@auvipy
auvipy self-requested a review November 10, 2026 17:40
@JekaK
JekaK marked this pull request as ready for review November 10, 2026 18:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

There are no active review issues for the SBOM wheel-component deduplication change.

No open issues 🎉

What changed in this PR

Fixes #750 by declaring the wheel component only once in generated CycloneDX SBOMs, while preserving its dependency links to grafted libraries.

Changes:

  • Keeps the wheel in metadata.component and limits components to grafted libraries.
  • Updates unit and integration assertions to check wheel exclusion and dependency graph consistency.
  • Documents the fix in the changelog.
File Description
tests/​unit/​test_sboms.py Updates expected components and verifies deterministic library references and dependency links.
tests/​integration/​test_manylinux.py Checks wheel exclusion and dependency links in the installed NumPy SBOM.
src/​auditwheel/​sboms.py Defines the wheel solely in metadata, removing its duplicate component entry.
CHANGELOG.md Adds a user-facing bugfix entry linked to #750.

Review effort: Balanced

@codecov

codecov Bot commented Nov 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.08%. Comparing base (70191b6) to head (369e83d).

Additional details and impacted files
@@            Coverage Diff            @@
##           main     #752       +/-   ##
=========================================
+ Coverage      0   96.08%   +96.08%     
=========================================
  Files         0       23       +23     
  Lines         0     2041     +2041     
  Branches      0      390      +390     
=========================================
+ Hits          0     1961     +1961     
- Misses        0       46       +46     
- Partials      0       34       +34     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mayeut
mayeut merged commit f7828ff into pypa:main Nov 14, 2026
21 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.

4 participants