-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
UnknownComponentDependencyException with SBOM from cyclonedx-javascript-library #746
Comments
Thanks for the report, @finger42 . Could you provide a reproducible setup? |
Hello, Thx for the hint do to my homework ;-)
I think the problem is that there are two components, which are exactly the same ( only the bom-ref differs ) If I modify one property in one of the comonents. e.g. version to something other, the problem is gone. Now my question: Is this a valid SBOM ? If not, then the generator of the original SBOM , or another script, needs to strip the duplicated components ? Beside that, the error msg:
could be improved to point out that there are duplicated components in the dependency tree ? |
yepp, exactly that should be the reason. The python library does some deduplication, since it uses |
It should be schema-valid, yes. |
So I need to deduplicate the SBOM generated with the cyclonedx-javascript-library. |
@finger42 , may I ask for some background? Are you using one of the many open-source SBOM generators running on nodej? Which one? Thank you in advance. |
I try to build SBOMs with different tools. Some of these tools are using javascirpt for webapps, some of them the nuget lib, others the python lib. Or even other SBOM generators ( yocto. buildroot, ... ) I currently dont know, but they exist ;-) All in common is the final goal to import SBOMs in self hosted https://dependencytrack.org/ to monitor the components for different firmware versions (also for old devices).
I will ask my webdevs why the double components are inside the given SBOM. I think that the CRA is the reason why this topic ( SBOM ) is getting more attention. And yes, I understand that it is hard to get feedback from closed source to open source projects. Thank you ! |
a workaround: use properties to make each component unique. |
@jkowalleck I need to wait till next year for my team an test the properties as a workaround. |
a thing could be the nature of not-deduplicated node modules - read https://github.com/CycloneDX/cyclonedx-node-npm/blob/main/docs/component_deduplication.md and see examples here: |
Hello,
I try to enhance a given SBOM, which is generated with
https://github.com/CycloneDX/cyclonedx-javascript-library
While writing the sbom with output_as_string I get the exception:
UnknownComponentDependencyException
cyclonedx.exception.model.UnknownComponentDependencyException: One or more Components have Dependency references to Components/Services that are not known in this BOM. They are: {<BomRef '@mui/styled-engine@npm:5.16.6 [3135b]' id=126477793907040>, <BomRef '@mui/material@npm:5.14.0 [cd63f]' id=126477793557152>, <BomRef 'react-redux@npm:8.1.1 [cd63f]' id=126477790002304>, <BomRef '@mui/system@npm:5.16.7 [c1a0d]' id=126477793910160>}
For example the component:
@mui/styled-engine@npm:5.16.6 [3135b]
is used in:
and
I dont know why the [3135b] is added to this component. It looks like an hash or something.
Could it be that the space between @mui/system@npm:5.16.7 and [260c3] causes the problems?
I am using cyclonedx-python-lib Version: 8.5.0
Any ideas or suggestions would help.
The text was updated successfully, but these errors were encountered: