mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-10-21 16:32:45 -09:00
utils/generate-cyclonedx: add "id" property to resolves
The CycloneDX spec defines the "components.pedigree.patches.resolves"
object [1] as supporting both a "name" & "id" property.
The definition provided for the "id" property is the following [2]:
> The identifier of the issue assigned by the source of the issue
And for the "name" property [3]:
> The name of the issue
The "resolves" object was introduced in commit [4] and only used the
"name" property to link to the vulnerability it resolves.
In example [5] provided on the CycloneDX website, both the "name" & "id"
properties are set in the security example.
In the vulnerability context, and more precisely the CVEs, the "name"
and the "id" are the same and thus the value can be duplicated across
the two properties.
This commit replicates the behavior documented in [5] to improve
compatibility with tools.
[1] https://cyclonedx.org/docs/1.6/json/#components_items_pedigree_patches_items_resolves
[2] https://cyclonedx.org/docs/1.6/json/#components_items_pedigree_patches_items_resolves_items_id
[3] https://cyclonedx.org/docs/1.6/json/#components_items_pedigree_patches_items_resolves_items_name
[4] 9415529923 utils/generate-cyclonedx: add support for 'resolved_with_pedigree'
[5] https://cyclonedx.org/use-cases/pedigree/
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Arnout Vandecappelle <arnout@rnout.be>
This commit is contained in:
committed by
Arnout Vandecappelle
parent
f680fe2a61
commit
074e650219
@@ -233,6 +233,7 @@ def cyclonedx_patches(patch_list: list[str]):
|
||||
"resolves": [
|
||||
{
|
||||
"type": "security",
|
||||
"id": cve,
|
||||
"name": cve
|
||||
} for cve in cves
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user