Skip to content

fix: preserve multiple package versions in SBOM output - #19

Merged
AlexanderLanin merged 1 commit into
eclipse-score:mainfrom
nicu1989:nicu1989_sbom_versions_fix
Oct 15, 2026
Merged

AlexanderLanin merged 1 commit into
eclipse-score:mainfrom
nicu1989:nicu1989_sbom_versions_fix

Conversation

@nicu1989

Copy link
Copy Markdown
Member

Deduplicate components by name and version.
Keep Rust cache entries and license lookups separate for each version. Require matching versions when reading older crate caches.

Closes: #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.

🟡 Changes recommended

Deduplication can discard existing metadata, and mixed legacy/versioned cache selection remains order-dependent.

1 open finding
What changed in this PR

Preserves distinct package versions and version-specific Rust metadata in SBOM output.

Changes:

  • Deduplicates components by name and version.
  • Keys Rust cache entries and license data by name@version.
  • Adds multi-version regression tests and documentation.
File Description
internal/​generator/​sbom_generator.py Adds version-aware metadata lookup and deduplication.
scripts/​generate_crates_metadata_cache.py Generates version-specific Rust cache entries.
tests/​test_sbom_generator.py Tests multi-version SBOM generation.
tests/​test_generate_crates_metadata_cache.py Tests version-specific cache generation.
README.md Documents multi-version behavior.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/generator/sbom_generator.py Outdated
FScholPer
FScholPer previously approved these changes Oct 13, 2026

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.

🟡 Changes recommended

Mixed legacy and versioned cache entries can suppress an otherwise unambiguous versioned match.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread internal/generator/sbom_generator.py Outdated
@nicu1989
nicu1989 force-pushed the nicu1989_sbom_versions_fix branch from 8b8503f to 39b7ee4 Compare October 14, 2026 12:09
@nicu1989
nicu1989 requested a balanced review from Copilot October 14, 2026 12:11

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.

🟡 Changes recommended

Version-specific crate dependency edges are silently omitted from CycloneDX output.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread internal/generator/sbom_generator.py
Deduplicate components by name and version.
Keep Rust cache entries and license lookups separate for each version.
Require matching versions when reading older crate caches.

Signed-off-by: Nicolae Dicu <nicolae.dicu.ext@qorix.ai>
@nicu1989
nicu1989 force-pushed the nicu1989_sbom_versions_fix branch from 39b7ee4 to cccf6ae Compare October 14, 2026 14:30
@nicu1989
nicu1989 requested a balanced review from Copilot October 14, 2026 14:30

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.

🟢 Approval recommended

The implementation addresses the reported metadata collision and includes comprehensive regression coverage.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@AlexanderLanin
AlexanderLanin merged commit 63ff7bb into eclipse-score:main Oct 15, 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.

Missing multiple package versions and their metadata in SBOM output

4 participants