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 <fabien.lehoussel@smile.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
committed by
Peter Korsgaard
parent
2982fac48e
commit
6098cc45d6
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user