Skip to content

fix: BOM validation fails when Components or Services are nested - #276

Merged
madpah merged 11 commits into
mainfrom
fix/bom-validation-nested-components-isue-275
Aug 1, 2022
Merged

madpah merged 11 commits into
mainfrom
fix/bom-validation-nested-components-isue-275

Conversation

@madpah

@madpah madpah commented Jul 27, 2022 •

Copy link
Copy Markdown
Collaborator

@madpah madpah added the bug Something isn't working label Jul 27, 2022
@madpah madpah self-assigned this Jul 27, 2022
@madpah
madpah marked this pull request as ready for review July 27, 2022 17:16
@madpah
madpah requested a review from a team as a code owner July 27, 2022 17:16
Comment thread cyclonedx/model/component.py Resolved
@madpah
madpah force-pushed the fix/bom-validation-nested-components-isue-275 branch from 907fec9 to d6955cb Compare July 28, 2022 08:40
@madpah
madpah requested a review from jkowalleck July 28, 2022 08:48
@madpah madpah linked an issue Jul 28, 2022 that may be closed by this pull request
@madpah
madpah dismissed jkowalleck’s stale review July 29, 2022 09:17

Comments address - review not dismissing?

@jkowalleck

jkowalleck commented Jul 29, 2022 •

Copy link
Copy Markdown
Member

@madpah no issue with your implementation. it is solid. and i would not change it at all.
just another view on the problem:

but i thing a tree iterator algorithm on the Set of Component - let's call it ComponentRepository -
would be a better fit. it is similar to the thing you've built. but it shifts the iteration to the set, away from the tree root Component.

why i thing it fits better? Because the set is already a collection - that is iterated.

did this in the JS implementation: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/136/files#diff-91e0bfb8ec98ef0ee09645d5c3ccbfec3d1fcafcc0d74e81c7e3cb08ed0aee31R141-R146
(ignore the strange method name - its just some way to "hide" methods in javascript - similar to the __-prefix in python)

@madpah
madpah merged commit 68a0cdd into main Aug 1, 2022
@madpah
madpah deleted the fix/bom-validation-nested-components-isue-275 branch March 30, 2023 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Nested Components or Services breaks BOM validation

2 participants