mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-01 21:23:51 -09:00
utils/generate-cyclonedx: fix 'project' dependency
The definition of the project name & version is stored under the `metadata:component` CycloneDX property. Since the introduction of the `generate-cyclonedx` script [1] a 'buildroot' dependency entry that depends on every components has been part of the generated SBOM. Tools such as 'DependencyTrack' relies on such entry to create graph of the entire project. With the commit [2] that introduced the option to pass a custom project name and version, this dependency reference was not updated to match the custom 'bom-ref'. This patch fixes the reference to match the custom project name. [1]dbab39e2d9support/scripts/generate-cyclonedx.py: add script to generate CycloneDX-style SBOM [2]9cbbc47762utils/generate-cyclonedx: add project name and version options Signed-off-by: Thomas Perale <thomas.perale@mind.be> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
191367ad12
commit
189a983c7d
@@ -428,7 +428,7 @@ def main():
|
|||||||
cyclonedx_component(name, comp) for name, comp in filtered_show_info_dict.items()
|
cyclonedx_component(name, comp) for name, comp in filtered_show_info_dict.items()
|
||||||
],
|
],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
cyclonedx_dependency("buildroot", list(filtered_show_info_dict)),
|
cyclonedx_dependency(args.project_name, list(filtered_show_info_dict)),
|
||||||
*[cyclonedx_dependency(ref, br2_parse_deps_recursively(ref, show_info_dict, args.virtual))
|
*[cyclonedx_dependency(ref, br2_parse_deps_recursively(ref, show_info_dict, args.virtual))
|
||||||
for ref in filtered_show_info_dict],
|
for ref in filtered_show_info_dict],
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user