From 6098cc45d64e9e7928f888b7cdf79533813d19c4 Mon Sep 17 00:00:00 2001 From: Fabien Lehoussel Date: Wed, 16 Jul 2025 11:33:46 +0200 Subject: [PATCH] utils/generate-cyclonedx: move metadata section to top level This makes it more readable and easier to quickly identify basic information. Signed-off-by: Fabien Lehoussel Signed-off-by: Peter Korsgaard --- utils/generate-cyclonedx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/generate-cyclonedx b/utils/generate-cyclonedx index 46f68ac63d..d662f02527 100755 --- a/utils/generate-cyclonedx +++ b/utils/generate-cyclonedx @@ -297,6 +297,14 @@ def main(): "bomFormat": "CycloneDX", "$schema": f"http://cyclonedx.org/schema/bom-{CYCLONEDX_VERSION}.schema.json", "specVersion": f"{CYCLONEDX_VERSION}", + "metadata": { + "component": { + "bom-ref": "buildroot", + "name": "buildroot", + "type": "firmware", + "version": f"{BR2_VERSION_FULL}", + }, + }, "components": [ cyclonedx_component(name, comp) for name, comp in filtered_show_info_dict.items() ], @@ -306,14 +314,6 @@ def main(): for ref in filtered_show_info_dict], ], "vulnerabilities": cyclonedx_vulnerabilities(show_info_dict), - "metadata": { - "component": { - "bom-ref": "buildroot", - "name": "buildroot", - "type": "firmware", - "version": f"{BR2_VERSION_FULL}", - }, - }, } args.out_file.write(json.dumps(cyclonedx_dict, indent=2))