-
-
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
Components not properly in dep tree nor BOM #540
Comments
will add test cases to older versions, for regression and showcasing-purposes, I am planning to have all affected major versions fixed. ++++ the issue does not rely on same name of components, but the fact that both component have an equal (not identical) bom_ref - with a |
bom_ref.name
break dependency tree
I'm not understanding this. All the components in the example script have unique |
bom_ref.name
break dependency treebom_ref.value
break dependency tree
bom_ref.value
break dependency tree
did some research and found, that Per CycloneDX Specification, the minimal set of equality-properties of Components are: type, name` As all is ass expected, I'll close this issue. |
Ah, that is interesting. I would expect a "guaranteed unique" property would be used for testing "unique-ness." But I understand. I guess I'm drawing too much on my database experience. :) Thanks for digging in to this and doing the research! |
I encountered a similar issue with a different component tree.
In my opinion, the component equality validation should be performed within the context of a parent component, rather than within the context of a root component. Am I misunderstanding something? |
@madpah FYI |
this issue should have been closed via #587 or so |
From my perspective, it seems that this issue does not specifically address the same problem. To reproduce the second case mentioned here, you can use the provided example BOM file UnkCompDepEx.json. Here is a code example that reads the BOM file and writes it to a string:
When running this code, I get the 'UnknownComponentDependencyException' error message:
Feel free to reach out if you need further assistance |
I think the problem lies in the deduplication of SortedSet; elements are not added to the set when their value matches. Example:
If object equality is not defined by their |
Addresses CycloneDX#540 Signed-off-by: wkoot <[email protected]>
|
Fair point but when there are multiple BOM files sourced in the python script, this is no longer applicable. For example, in this case for already loaded bom_files 1 and 2: for loaded_bom in [bom_file1, bom_file2]:
root_bom.components |= loaded_bom.components
root_bom.dependencies |= loaded_bom.dependencies The set difference Is the |
then the python script you wrote needs top take care of this. |
I have submitted CycloneDX/cyclonedx-cli#399 to address the discrepancy between the implementation in python and c# libraries. Note also that the MergeTests for the C# library explicitly do not take |
I was wondering if duplicate components in nested objects are supposed to be deduplicated, or if they should not be. |
not intended for nested of parallels, as they may contextualize the individual outer component. |
It seems that deserialization silently loads broken bom data, in the case of duplicate components as earlier referred to. EDIT: Created separate issue - #677 |
please open a dedicated issue for that. |
Fixes CycloneDX#540 Signed-off-by: wkoot <[email protected]>
Fixes CycloneDX#540 Signed-off-by: wkoot <[email protected]>
This is version 6.4.0
Components with unique bom_refs, but the same name, will generate an error when trying to render a dependency tree. Given this script:
I get this error when I run it:
The text was updated successfully, but these errors were encountered: