Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate packages after merge #101

Closed
vargenau opened this issue Sep 3, 2024 · 7 comments · Fixed by #119
Closed

Duplicate packages after merge #101

vargenau opened this issue Sep 3, 2024 · 7 comments · Fixed by #119
Assignees

Comments

@vargenau
Copy link
Contributor

vargenau commented Sep 3, 2024

example6-src.spdx.txt
example6-lib.spdx.txt
merge.spdx.json

sbomasm assemble -n merge -v 1 -t "application" -o merge.spdx.json example6-*.spdx 

Both example6-src.spdx and example6-lib.spdx contain identical packages, go.reflect and go.strconv.

In the merge, these packages are present twice.

I would expect no duplicates.

In real-world examples, I have many duplicates.

@viveksahu26
Copy link
Contributor

Thanks for raising this issue. Will get back to you 👍

@riteshnoronha
Copy link
Contributor

@vargenau yes as mentioned in our readme, we do not remove duplicates, but if that is a requirement we will need to add a mode to each merge algo to remove duplicate components.

A potential Algo to identify duplicates would be

  1. PURL match
  2. CPE match
  3. Name-Version match
  4. Checksum match
    We would execute these checks in a sequence, whichever matches indicates its a duplicate and eleminate it.

Thanks for a feature request will work on this.

@vargenau
Copy link
Contributor Author

Any progress on implementing this?

@riteshnoronha
Copy link
Contributor

@vargenau we implemented this for CycloneDX, will move over the logic for SPDX by next release.

@vargenau
Copy link
Contributor Author

Very good, thank you!

@riteshnoronha
Copy link
Contributor

@vargenau v0.2.0 has been released please give it a shot.

@vargenau
Copy link
Contributor Author

@vargenau v0.2.0 has been released please give it a shot.

Yes, I have seen it. I will check. Thank you for the improvement.

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 a pull request may close this issue.

3 participants