浏览代码

build: fix kernel component in CycloneDX SBOM

As stated in the cycloneDX documentation, the field "type" is mandatory for all components.

More details here (https://cyclonedx.org/docs/1.5/json/#components_items_type)

Signed-off-by: Cedric DOURLENT <[email protected]>
Cedric DOURLENT 1 年之前
父节点
当前提交
84331215e5
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      scripts/package-metadata.pl

+ 2 - 0
scripts/package-metadata.pl

@@ -677,6 +677,7 @@ sub gen_image_cyclonedxsbom() {
 		license => "GPL-2.0",
 		cpe_id  => "cpe:/o:linux:linux_kernel",
 		name    => "kernel",
+		category  => "operating-system",
 	};
 
 	my %abimap;
@@ -705,6 +706,7 @@ sub gen_image_cyclonedxsbom() {
 		if ($pkg->{category}) {
 			my $category = $pkg->{category};
 			my %cat_type = (
+				"operating-system"        => "operating-system",
 				"Firmware"        => "firmware",
 				"Libraries"       => "library"
 			);