Skip to content

java: move CycloneDX deduplication to the coalescer - #2066

Merged
github-actions[bot] merged 1 commit into
quay:mainfrom
crozzy:cyclonedx-dedupe-coalescer
Oct 23, 2026
Merged

github-actions[bot] merged 1 commit into
quay:mainfrom
crozzy:cyclonedx-dedupe-coalescer

Conversation

@crozzy

@crozzy crozzy commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

CycloneDX documents in one layer can describe JAR artifacts in another layer, also, CycloneDX documents embedded within JARs can describe JAR artifacts outside of those JARs. This patch moves the package deduplication down to the coalescer in order for it have the full context of all the layers before deciding which packages are duplicates.

@crozzy
crozzy force-pushed the cyclonedx-dedupe-coalescer branch 2 times, most recently from 25a58ac to 6e6ff53 Compare October 22, 2026 15:32
@crozzy crozzy changed the title java: more CycloneDX deduplication to the coalescer java: move CycloneDX deduplication to the coalescer Oct 22, 2026
@crozzy
crozzy marked this pull request as ready for review October 22, 2026 15:33
@crozzy
crozzy requested review from a team as code owners October 22, 2026 15:33
@crozzy
crozzy requested review from BradLugo, dcaravel and hdonnay and removed request for hdonnay October 22, 2026 15:33

@BradLugo BradLugo 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.

I'm still not totally convinced this is the correct approach. I won't block the merge, but for example, what happens if a jar replaces a build that the SBOM claims?

Comment thread java/packagescanner.go Outdated
Comment thread java/packagescanner.go Outdated
@crozzy

crozzy commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

I'm still not totally convinced this is the correct approach. I won't block the merge, but for example, what happens if a jar replaces a build that the SBOM claims?

Like if someone later adds a JAR in the same path with the same name as the JAR in the SBOM? I guess in this situation it would be worth relying on the sha and never consulting the path

Comment thread java/coalescer.go
CycloneDX documents in one layer can describe JAR artifacts
in another layer, also, CycloneDX documents embedded within
JARs can describe JAR artifacts outside of those JARs. This
patch moves the package deduplication down to the coalescer
in order for it have the full context of all the layers
before deciding which packages are duplicates.

Signed-off-by: crozzy <joseph.crosland@gmail.com>
@crozzy
crozzy force-pushed the cyclonedx-dedupe-coalescer branch from 6e6ff53 to 9864999 Compare October 23, 2026 15:52
@crozzy
crozzy requested a review from BradLugo October 23, 2026 17:02
Comment thread java/coalescer.go
@crozzy
crozzy requested a review from BradLugo October 23, 2026 19:41
@crozzy

crozzy commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

/fast-forward

@github-actions
github-actions Bot merged commit 9864999 into quay:main Oct 23, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants