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

#606 When multiple bom ref are found when cdx runs on a .sln allow bom generation. #831

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mtsfoni
Copy link
Contributor

@mtsfoni mtsfoni commented Jan 13, 2024

I could only reproduce this, calling CycloneDX directly on the .sln-file. That creates the situation that dependencies of each project are gathered separately and then aggregated. This way CycloneDX cannot know, which is the actually used version as depending on which project you build either is true.

I am not 100% sure if this should be fixed, as the result might not reflect the actual truth.

However, who generates an SBOM from a .sln-file that includes multiple packages or other output projects (like executables or services, I like to call those root-projects) cannot expect the SBOM to include sensible information.

So in that case, CycloneDX will show this warning and resolve to the first found reference:

Warning: Multiple BOM references were found for rebus [6.0.0, 7.0.0). It appears that the component has been located multiple times with different versions. To resolve this issue, consider targeting a project file directly that's using a project.assets.json to resolve dependencies and avoid using the --recursive argument.
Choosing first found reference rebus 7.1.0 to resolve.

#606 (comment)

…CycloneDX runs on .sln-file, show a warning and allow bom-generation. Use first ref-bom from the collection

Signed-off-by: MTsfoni <[email protected]>
@mtsfoni mtsfoni requested a review from a team as a code owner January 13, 2024 19:37
Signed-off-by: MTsfoni <[email protected]>
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.

1 participant