-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
fix: change Component.Evidence.Identity
to array
#204
base: master
Are you sure you want to change the base?
fix: change Component.Evidence.Identity
to array
#204
Conversation
Signed-off-by: DmitriyLewen <[email protected]>
Signed-off-by: DmitriyLewen <[email protected]>
Signed-off-by: DmitriyLewen <[email protected]>
Signed-off-by: DmitriyLewen <[email protected]>
9331e90
to
76dd76b
Compare
Signed-off-by: DmitriyLewen <[email protected]>
Signed-off-by: DmitriyLewen <[email protected]>
Signed-off-by: DmitriyLewen <[email protected]>
// Spec version 1.5 uses only one Identity. | ||
// cf. https://cyclonedx.org/docs/1.5/json/#components_items_evidence_identity | ||
if c.Evidence.Identity != nil { | ||
ids := *c.Evidence.Identity | ||
ids = ids[:1] | ||
c.Evidence.Identity = &ids | ||
} |
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'm not sure about this way...
Maybe we need to select one Identifier
using Field
with some order
Please tell me if you have a better solution.
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 overwrite all the Evidence fields in the MarshalXML
and UnmarshalXML
functions, so I added test cases for each field.
Tell me if this is too much
Description
in CycloneDX 1.6 type of
Component.Evidence.Identity
has been changed to[]Identity
.Identity
asstruct
was marked asdeprecated
.https://cyclonedx.org/docs/1.6/json/#tab-pane_metadata_component_evidence_identity_oneOf_i0
Related issues
Component.Evidence.Identity
field in CycloneDX 1.6 #192