-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
feat: add extended support for Definitions #713
base: main
Are you sure you want to change the base?
Conversation
19ea024
to
2d420c9
Compare
18f2630
to
8145a51
Compare
8145a51
to
b362feb
Compare
An optional identifier which can be used to reference the requirement elsewhere in the BOM. | ||
Every bom-ref MUST be unique within the BOM. | ||
|
||
If a value was not provided in the constructor, a UUIDv4 will have been assigned. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a value was not provided in the constructor, a UUIDv4 will have been assigned.
has this been tested?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now introduced some additional tests for this in cyclonedx/model/definition.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but still, there is not UUIDv4 assigned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just remove this line and you are good.
(just like it was removed in other places: #733)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, if you actually intended to have these bom-ref
s being non-null on rendering, like we do for component
s, then you should hook into BomRefDiscriminator.from_bom()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok, I see now your point.
I think assigning a non-required field automatically would cause a lot more problems in the downstream later on. I also do not have a scenario how to reference/use a bom-ref
of a requirement elsewhere within the BOM. I'll just remove the lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also do not have a scenario how to reference/use a bom-ref of a requirement elsewhere within the BOM.
Here is one: $.declarations.attestations[].map[].requirement
- https://cyclonedx.org/docs/1.6/json/#declarations_attestations_items_map_items_requirement
The bom-ref to the requirement being attested to.
PS: This is in fact a very good reason to auto-populate this specific bom-refs on rendering. The same why we auto-populate bom-refs of components & services, as they could be used in a dependency tree.
for CycloneDX#697 Signed-off-by: Hakan Dilek <hakandilek@gmail.com>
Signed-off-by: Hakan Dilek <hakandilek@gmail.com>
Signed-off-by: Hakan Dilek <hakandilek@gmail.com>
b362feb
to
1816586
Compare
This PR builds on top of #701 to create extended elements for the
bom.definitions.standards
like:depends on: #701
is part of: #696