-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
[BUG] Nested Components or Services breaks BOM validation #275
Comments
Hi @peschuster - thanks for raising this. Can you please:
Thanks! |
I am using version 2.7.0 of cyclonedx-python-lib. Here is a short example that leads to this exception:
|
bom.metadata.component
Thanks for the details @peschuster. Agree this is a bug in the library - so we'll work on a fix. I'm also curious (so we can feedback to the Core CycloneDX group) what your Use Case is for nesting Components in Thanks! |
@peschuster - reviewing in greater depth, and whilst I can't say that your example above contradicts the CycloneDX schema, I wonder whether your example is incorrect and should re-written. From your example, I understand that:
If my understanding is correct, then the expected way to model this in CycloneDX is as follows:
Appreciate your feedback here. FYI @jkowalleck |
The nesting is not in Here is the expected output for the example:
|
Thanks for the quick response @peschuster. I see the root issue now - the validation in Will dig in further. |
Signed-off-by: Paul Horton <[email protected]>
Signed-off-by: Paul Horton <[email protected]>
bom.metadata.component
Signed-off-by: Paul Horton <[email protected]>
@peschuster as you might see we are working to address the validation issue you have raised. I did want to point out a bit of documentation which may or may not relate to how you are wishing to use CycloneDX for your reference. With regards to
This is taken from https://cyclonedx.org/docs/1.4/xml/#type_component. Given your earlier description - I just wanted to make sure you were aware of this. |
@madpah the nesting is not about dependencies (but it can be, too) |
Signed-off-by: Paul Horton <[email protected]>
Signed-off-by: Paul Horton <[email protected]>
Signed-off-by: Paul Horton <[email protected]>
@peschuster https://pypi.org/project/cyclonedx-python-lib/2.7.1/ has been released. |
The schema documents suggest that components can be nested inside other components (i.e. for/with hierarchical merging).
Hoewever, if I try to generate such a bom an exception is raised in the validate method here:
cyclonedx-python-lib/cyclonedx/model/bom.py
Line 384 in 6e12be7
The reason for that is, because nested bom_refs underneath other components are not found by the implementation inside validate.
Am I misunderstanding the schema or is this missing from the validation?
The text was updated successfully, but these errors were encountered: