From 520830b51b7681b64daa484854e3c1114898a589 Mon Sep 17 00:00:00 2001 From: Nikita Pivkin Date: Thu, 2 Nov 2023 01:46:32 +0000 Subject: [PATCH] fix(server): add licenses to `BlobInfo` message (#5382) --- ...fluentd-multiple-lockfiles.cdx.json.golden | 1912 ++++++++++++++++- pkg/rpc/convert.go | 121 +- pkg/rpc/convert_test.go | 182 +- rpc/cache/service.pb.go | 145 +- rpc/cache/service.proto | 1 + rpc/cache/service.twirp.go | 105 +- rpc/common/service.pb.go | 614 ++++-- rpc/common/service.proto | 47 +- 8 files changed, 2796 insertions(+), 331 deletions(-) diff --git a/integration/testdata/fluentd-multiple-lockfiles.cdx.json.golden b/integration/testdata/fluentd-multiple-lockfiles.cdx.json.golden index ff77b1c8482f..88362c1fb577 100644 --- a/integration/testdata/fluentd-multiple-lockfiles.cdx.json.golden +++ b/integration/testdata/fluentd-multiple-lockfiles.cdx.json.golden @@ -55,6 +55,13 @@ "type": "library", "name": "adduser", "version": "3.118", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/adduser@3.118?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -88,6 +95,13 @@ "type": "library", "name": "apt", "version": "1.8.2", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/apt@1.8.2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -121,6 +135,13 @@ "type": "library", "name": "base-files", "version": "10.3+deb10u2", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/base-files@10.3%2Bdeb10u2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -154,6 +175,18 @@ "type": "library", "name": "base-passwd", "version": "3.5.46", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "PD" + } + } + ], "purl": "pkg:deb/debian/base-passwd@3.5.46?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -187,6 +220,13 @@ "type": "library", "name": "bash", "version": "5.0-4", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/bash@5.0-4?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -224,6 +264,58 @@ "type": "library", "name": "bsdutils", "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/bsdutils@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -261,6 +353,18 @@ "type": "library", "name": "ca-certificates", "version": "20190110", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "MPL-2.0" + } + } + ], "purl": "pkg:deb/debian/ca-certificates@20190110?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -294,6 +398,13 @@ "type": "library", "name": "coreutils", "version": "8.30-3", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/coreutils@8.30-3?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -331,6 +442,13 @@ "type": "library", "name": "dash", "version": "0.5.10.2-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/dash@0.5.10.2-5?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -368,6 +486,13 @@ "type": "library", "name": "debconf", "version": "1.5.71", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + } + ], "purl": "pkg:deb/debian/debconf@1.5.71?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -401,6 +526,13 @@ "type": "library", "name": "debian-archive-keyring", "version": "2019.1", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/debian-archive-keyring@2019.1?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -434,6 +566,13 @@ "type": "library", "name": "debianutils", "version": "4.8.6.1", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/debianutils@4.8.6.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -467,6 +606,18 @@ "type": "library", "name": "diffutils", "version": "3.7-3", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL" + } + } + ], "purl": "pkg:deb/debian/diffutils@3.7-3?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -508,6 +659,28 @@ "type": "library", "name": "dpkg", "version": "1.19.7", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "public-domain-s-s-d" + } + }, + { + "license": { + "name": "public-domain-md5" + } + } + ], "purl": "pkg:deb/debian/dpkg@1.19.7?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -541,6 +714,18 @@ "type": "library", "name": "e2fsprogs", "version": "1.44.5-1+deb10u2", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + } + ], "purl": "pkg:deb/debian/e2fsprogs@1.44.5-1%2Bdeb10u2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -578,6 +763,58 @@ "type": "library", "name": "fdisk", "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/fdisk@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -615,6 +852,18 @@ "type": "library", "name": "findutils", "version": "4.6.0+git+20190209-2", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL-1.3" + } + } + ], "purl": "pkg:deb/debian/findutils@4.6.0%2Bgit%2B20190209-2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -652,6 +901,33 @@ "type": "library", "name": "gcc-8-base", "version": "8.3.0-6", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL-1.2" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Artistic" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/gcc-8-base@8.3.0-6?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -689,23 +965,70 @@ "type": "library", "name": "gpgv", "version": "2.2.12-1+deb10u1", - "purl": "pkg:deb/debian/gpgv@2.2.12-1%2Bdeb10u1?arch=amd64\u0026distro=debian-10.2", - "properties": [ + "licenses": [ { - "name": "aquasecurity:trivy:LayerDiffID", - "value": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f" + "license": { + "name": "GPL-3.0" + } }, { - "name": "aquasecurity:trivy:LayerDigest", - "value": "sha256:000eee12ec04cc914bf96e8f5dee7767510c2aca3816af6078bd9fbe3150920c" + "license": { + "name": "permissive" + } }, { - "name": "aquasecurity:trivy:PkgID", - "value": "gpgv@2.2.12-1+deb10u1" + "license": { + "name": "LGPL-2.1" + } }, { - "name": "aquasecurity:trivy:PkgType", - "value": "debian" + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "RFC-Reference" + } + }, + { + "license": { + "name": "TinySCHEME" + } + }, + { + "license": { + "name": "CC0-1.0" + } + } + ], + "purl": "pkg:deb/debian/gpgv@2.2.12-1%2Bdeb10u1?arch=amd64\u0026distro=debian-10.2", + "properties": [ + { + "name": "aquasecurity:trivy:LayerDiffID", + "value": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f" + }, + { + "name": "aquasecurity:trivy:LayerDigest", + "value": "sha256:000eee12ec04cc914bf96e8f5dee7767510c2aca3816af6078bd9fbe3150920c" + }, + { + "name": "aquasecurity:trivy:PkgID", + "value": "gpgv@2.2.12-1+deb10u1" + }, + { + "name": "aquasecurity:trivy:PkgType", + "value": "debian" }, { "name": "aquasecurity:trivy:SrcName", @@ -726,6 +1049,13 @@ "type": "library", "name": "grep", "version": "3.3-1", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/grep@3.3-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -763,6 +1093,13 @@ "type": "library", "name": "gzip", "version": "1.9-3", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/gzip@1.9-3?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -800,6 +1137,13 @@ "type": "library", "name": "hostname", "version": "3.21", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/hostname@3.21?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -833,6 +1177,18 @@ "type": "library", "name": "init-system-helpers", "version": "1.56+nmu1", + "licenses": [ + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/init-system-helpers@1.56%2Bnmu1?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -866,6 +1222,23 @@ "type": "library", "name": "libacl1", "version": "2.2.53-4", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + } + ], "purl": "pkg:deb/debian/libacl1@2.2.53-4?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -903,6 +1276,13 @@ "type": "library", "name": "libapt-pkg5.0", "version": "1.8.2", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libapt-pkg5.0@1.8.2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -936,6 +1316,23 @@ "type": "library", "name": "libattr1", "version": "2.4.48-4", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + } + ], "purl": "pkg:deb/debian/libattr1@2.4.48-4?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -977,6 +1374,23 @@ "type": "library", "name": "libaudit-common", "version": "2.8.4-3", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-1.0" + } + } + ], "purl": "pkg:deb/debian/libaudit-common@2.8.4-3?arch=all\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -1018,6 +1432,23 @@ "type": "library", "name": "libaudit1", "version": "2.8.4-3", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-1.0" + } + } + ], "purl": "pkg:deb/debian/libaudit1@2.8.4-3?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -1059,6 +1490,58 @@ "type": "library", "name": "libblkid1", "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libblkid1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1096,6 +1579,18 @@ "type": "library", "name": "libbz2-1.0", "version": "1.0.6-9.2~deb10u1", + "licenses": [ + { + "license": { + "name": "BSD-variant" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libbz2-1.0@1.0.6-9.2~deb10u1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1133,6 +1628,18 @@ "type": "library", "name": "libc-bin", "version": "2.28-10", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libc-bin@2.28-10?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1170,6 +1677,18 @@ "type": "library", "name": "libc6", "version": "2.28-10", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libc6@2.28-10?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1207,6 +1726,23 @@ "type": "library", "name": "libcap-ng0", "version": "0.7.9-2", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libcap-ng0@0.7.9-2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1351,6 +1887,18 @@ "type": "library", "name": "libext2fs2", "version": "1.44.5-1+deb10u2", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libext2fs2@1.44.5-1%2Bdeb10u2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1388,30 +1936,82 @@ "type": "library", "name": "libfdisk1", "version": "2.33.1-0.1", - "purl": "pkg:deb/debian/libfdisk1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", - "properties": [ + "licenses": [ { - "name": "aquasecurity:trivy:LayerDiffID", - "value": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f" + "license": { + "name": "GPL-2.0" + } }, { - "name": "aquasecurity:trivy:LayerDigest", - "value": "sha256:000eee12ec04cc914bf96e8f5dee7767510c2aca3816af6078bd9fbe3150920c" + "license": { + "name": "public-domain" + } }, { - "name": "aquasecurity:trivy:PkgID", - "value": "libfdisk1@2.33.1-0.1" + "license": { + "name": "BSD-4-Clause" + } }, { - "name": "aquasecurity:trivy:PkgType", - "value": "debian" + "license": { + "name": "MIT" + } }, { - "name": "aquasecurity:trivy:SrcName", - "value": "util-linux" + "license": { + "name": "BSD-2-Clause" + } }, { - "name": "aquasecurity:trivy:SrcRelease", + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], + "purl": "pkg:deb/debian/libfdisk1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", + "properties": [ + { + "name": "aquasecurity:trivy:LayerDiffID", + "value": "sha256:831c5620387fb9efec59fc82a42b948546c6be601e3ab34a87108ecf852aa15f" + }, + { + "name": "aquasecurity:trivy:LayerDigest", + "value": "sha256:000eee12ec04cc914bf96e8f5dee7767510c2aca3816af6078bd9fbe3150920c" + }, + { + "name": "aquasecurity:trivy:PkgID", + "value": "libfdisk1@2.33.1-0.1" + }, + { + "name": "aquasecurity:trivy:PkgType", + "value": "debian" + }, + { + "name": "aquasecurity:trivy:SrcName", + "value": "util-linux" + }, + { + "name": "aquasecurity:trivy:SrcRelease", "value": "0.1" }, { @@ -1425,6 +2025,13 @@ "type": "library", "name": "libffi6", "version": "3.2.1-9", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libffi6@3.2.1-9?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1499,6 +2106,18 @@ "type": "library", "name": "libgcrypt20", "version": "1.8.4-5", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libgcrypt20@1.8.4-5?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1536,6 +2155,23 @@ "type": "library", "name": "libgdbm-compat4", "version": "1.18.1-4", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "GFDL-NIV-1.3+" + } + } + ], "purl": "pkg:deb/debian/libgdbm-compat4@1.18.1-4?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1573,6 +2209,23 @@ "type": "library", "name": "libgdbm6", "version": "1.18.1-4", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "GFDL-NIV-1.3+" + } + } + ], "purl": "pkg:deb/debian/libgdbm6@1.18.1-4?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1610,6 +2263,23 @@ "type": "library", "name": "libgmp10", "version": "6.1.2+dfsg-4", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libgmp10@6.1.2%2Bdfsg-4?arch=amd64\u0026distro=debian-10.2\u0026epoch=2", "properties": [ { @@ -1651,6 +2321,48 @@ "type": "library", "name": "libgnutls30", "version": "3.6.7-4", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL-1.3" + } + }, + { + "license": { + "name": "CC0" + } + }, + { + "license": { + "name": "The MIT License" + } + }, + { + "license": { + "name": "LGPLv3+" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Apache-2.0" + } + } + ], "purl": "pkg:deb/debian/libgnutls30@3.6.7-4?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1688,6 +2400,28 @@ "type": "library", "name": "libgpg-error0", "version": "1.35-1", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "g10-permissive" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libgpg-error0@1.35-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1762,6 +2496,28 @@ "type": "library", "name": "libidn2-0", "version": "2.0.5-1", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Unicode" + } + } + ], "purl": "pkg:deb/debian/libidn2-0@2.0.5-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1799,6 +2555,38 @@ "type": "library", "name": "libjemalloc2", "version": "5.1.0-3", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-2-Clause-Chemeris" + } + }, + { + "license": { + "name": "BSD-3-Clause-Google" + } + }, + { + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "BSD-3-Clause-Hiroshima-University" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + } + ], "purl": "pkg:deb/debian/libjemalloc2@5.1.0-3?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1836,6 +2624,18 @@ "type": "library", "name": "liblz4-1", "version": "1.8.3-1", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/liblz4-1@1.8.3-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1873,6 +2673,73 @@ "type": "library", "name": "liblzma5", "version": "5.2.4-1", + "licenses": [ + { + "license": { + "name": "PD" + } + }, + { + "license": { + "name": "probably-PD" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "permissive-fsf" + } + }, + { + "license": { + "name": "Autoconf" + } + }, + { + "license": { + "name": "permissive-nowarranty" + } + }, + { + "license": { + "name": "none" + } + }, + { + "license": { + "name": "config-h" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "noderivs" + } + }, + { + "license": { + "name": "PD-debian" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/liblzma5@5.2.4-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -1910,6 +2777,58 @@ "type": "library", "name": "libmount1", "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libmount1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2003,24 +2922,71 @@ "value": "debian" }, { - "name": "aquasecurity:trivy:SrcName", - "value": "ncurses" + "name": "aquasecurity:trivy:SrcName", + "value": "ncurses" + }, + { + "name": "aquasecurity:trivy:SrcRelease", + "value": "2+deb10u2" + }, + { + "name": "aquasecurity:trivy:SrcVersion", + "value": "6.1+20181013" + } + ] + }, + { + "bom-ref": "pkg:deb/debian/libnettle6@3.4.1-1?arch=amd64\u0026distro=debian-10.2", + "type": "library", + "name": "libnettle6", + "version": "3.4.1-1", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "other" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "GPL-2.0-with-autoconf-exception" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "GAP" + } }, { - "name": "aquasecurity:trivy:SrcRelease", - "value": "2+deb10u2" + "license": { + "name": "LGPL-3.0" + } }, { - "name": "aquasecurity:trivy:SrcVersion", - "value": "6.1+20181013" + "license": { + "name": "GPL-3.0" + } } - ] - }, - { - "bom-ref": "pkg:deb/debian/libnettle6@3.4.1-1?arch=amd64\u0026distro=debian-10.2", - "type": "library", - "name": "libnettle6", - "version": "3.4.1-1", + ], "purl": "pkg:deb/debian/libnettle6@3.4.1-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2058,6 +3024,33 @@ "type": "library", "name": "libp11-kit0", "version": "0.23.15-2", + "licenses": [ + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "permissive-like-automake-output" + } + }, + { + "license": { + "name": "ISC" + } + }, + { + "license": { + "name": "ISC+IBM" + } + }, + { + "license": { + "name": "same-as-rest-of-p11kit" + } + } + ], "purl": "pkg:deb/debian/libp11-kit0@0.23.15-2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2095,6 +3088,13 @@ "type": "library", "name": "libpam-modules-bin", "version": "1.3.1-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libpam-modules-bin@1.3.1-5?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2132,6 +3132,13 @@ "type": "library", "name": "libpam-modules", "version": "1.3.1-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libpam-modules@1.3.1-5?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2169,6 +3176,13 @@ "type": "library", "name": "libpam-runtime", "version": "1.3.1-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libpam-runtime@1.3.1-5?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -2206,6 +3220,13 @@ "type": "library", "name": "libpam0g", "version": "1.3.1-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libpam0g@1.3.1-5?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2284,6 +3305,18 @@ "type": "library", "name": "libreadline7", "version": "7.0-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL" + } + } + ], "purl": "pkg:deb/debian/libreadline7@7.0-5?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2321,6 +3354,103 @@ "type": "library", "name": "libruby2.5", "version": "2.5.5-3+deb10u1", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "Ruby" + } + }, + { + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "SIL-1.1" + } + }, + { + "license": { + "name": "CC-BY-3.0-famfamfam" + } + }, + { + "license": { + "name": "PreserveNotice" + } + }, + { + "license": { + "name": "3C-BSD" + } + }, + { + "license": { + "name": "PublicDomain" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "AllPermissions" + } + }, + { + "license": { + "name": "PartialGplArtisticAndRuby" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Artistic" + } + }, + { + "license": { + "name": "zlib/libpng" + } + }, + { + "license": { + "name": "GPL-1.0" + } + }, + { + "license": { + "name": "CC0" + } + }, + { + "license": { + "name": "Unicode" + } + }, + { + "license": { + "name": "Permissive" + } + } + ], "purl": "pkg:deb/debian/libruby2.5@2.5.5-3%2Bdeb10u1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2358,6 +3488,13 @@ "type": "library", "name": "libseccomp2", "version": "2.3.3-4", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + } + ], "purl": "pkg:deb/debian/libseccomp2@2.3.3-4?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2395,6 +3532,18 @@ "type": "library", "name": "libselinux1", "version": "2.8-1+b1", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/libselinux1@2.8-1%2Bb1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2432,6 +3581,18 @@ "type": "library", "name": "libsemanage-common", "version": "2.8-2", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libsemanage-common@2.8-2?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -2469,6 +3630,18 @@ "type": "library", "name": "libsemanage1", "version": "2.8-2", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libsemanage1@2.8-2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2506,6 +3679,18 @@ "type": "library", "name": "libsepol1", "version": "2.8-1", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libsepol1@2.8-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2521,28 +3706,80 @@ "value": "libsepol1@2.8-1" }, { - "name": "aquasecurity:trivy:PkgType", - "value": "debian" + "name": "aquasecurity:trivy:PkgType", + "value": "debian" + }, + { + "name": "aquasecurity:trivy:SrcName", + "value": "libsepol" + }, + { + "name": "aquasecurity:trivy:SrcRelease", + "value": "1" + }, + { + "name": "aquasecurity:trivy:SrcVersion", + "value": "2.8" + } + ] + }, + { + "bom-ref": "pkg:deb/debian/libsmartcols1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", + "type": "library", + "name": "libsmartcols1", + "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } }, { - "name": "aquasecurity:trivy:SrcName", - "value": "libsepol" + "license": { + "name": "LGPL-2.1" + } }, { - "name": "aquasecurity:trivy:SrcRelease", - "value": "1" + "license": { + "name": "GPL-3.0" + } }, { - "name": "aquasecurity:trivy:SrcVersion", - "value": "2.8" + "license": { + "name": "LGPL-3.0" + } } - ] - }, - { - "bom-ref": "pkg:deb/debian/libsmartcols1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", - "type": "library", - "name": "libsmartcols1", - "version": "2.33.1-0.1", + ], "purl": "pkg:deb/debian/libsmartcols1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2691,6 +3928,33 @@ "type": "library", "name": "libsystemd0", "version": "241-7~deb10u2", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "CC0-1.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "public-domain" + } + } + ], "purl": "pkg:deb/debian/libsystemd0@241-7~deb10u2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2728,6 +3992,28 @@ "type": "library", "name": "libtasn1-6", "version": "4.13-3", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL-1.3" + } + } + ], "purl": "pkg:deb/debian/libtasn1-6@4.13-3?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2802,6 +4088,33 @@ "type": "library", "name": "libudev1", "version": "241-7~deb10u2", + "licenses": [ + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "CC0-1.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "public-domain" + } + } + ], "purl": "pkg:deb/debian/libudev1@241-7~deb10u2?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2839,6 +4152,48 @@ "type": "library", "name": "libunistring2", "version": "0.9.10-1", + "licenses": [ + { + "license": { + "name": "LGPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "FreeSoftware" + } + }, + { + "license": { + "name": "GPL-2+ with distribution exception" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL-1.2+" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "GFDL-1.2" + } + } + ], "purl": "pkg:deb/debian/libunistring2@0.9.10-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2876,6 +4231,58 @@ "type": "library", "name": "libuuid1", "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/libuuid1@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2913,6 +4320,18 @@ "type": "library", "name": "libyaml-0-2", "version": "0.2.1-1", + "licenses": [ + { + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "permissive" + } + } + ], "purl": "pkg:deb/debian/libyaml-0-2@0.2.1-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2950,6 +4369,28 @@ "type": "library", "name": "libzstd1", "version": "1.3.8+dfsg-3", + "licenses": [ + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Zlib" + } + }, + { + "license": { + "name": "Expat" + } + } + ], "purl": "pkg:deb/debian/libzstd1@1.3.8%2Bdfsg-3?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -2987,6 +4428,13 @@ "type": "library", "name": "login", "version": "4.5-1.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/login@4.5-1.1?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -3028,6 +4476,13 @@ "type": "library", "name": "mawk", "version": "1.3.3-17+b3", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/mawk@1.3.3-17%2Bb3?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3058,13 +4513,65 @@ "name": "aquasecurity:trivy:SrcVersion", "value": "1.3.3" } - ] - }, - { - "bom-ref": "pkg:deb/debian/mount@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", - "type": "library", - "name": "mount", - "version": "2.33.1-0.1", + ] + }, + { + "bom-ref": "pkg:deb/debian/mount@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", + "type": "library", + "name": "mount", + "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/mount@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3213,6 +4720,13 @@ "type": "library", "name": "passwd", "version": "4.5-1.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/passwd@4.5-1.1?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -3291,6 +4805,13 @@ "type": "library", "name": "rake", "version": "12.3.1-3", + "licenses": [ + { + "license": { + "name": "Expat" + } + } + ], "purl": "pkg:deb/debian/rake@12.3.1-3?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3328,6 +4849,18 @@ "type": "library", "name": "readline-common", "version": "7.0-5", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GFDL" + } + } + ], "purl": "pkg:deb/debian/readline-common@7.0-5?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3365,6 +4898,13 @@ "type": "library", "name": "ruby-did-you-mean", "version": "1.2.1-1", + "licenses": [ + { + "license": { + "name": "Expat" + } + } + ], "purl": "pkg:deb/debian/ruby-did-you-mean@1.2.1-1?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3402,6 +4942,13 @@ "type": "library", "name": "ruby-minitest", "version": "5.11.3-1", + "licenses": [ + { + "license": { + "name": "Expat" + } + } + ], "purl": "pkg:deb/debian/ruby-minitest@5.11.3-1?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3439,6 +4986,13 @@ "type": "library", "name": "ruby-net-telnet", "version": "0.1.1-2", + "licenses": [ + { + "license": { + "name": "Ruby" + } + } + ], "purl": "pkg:deb/debian/ruby-net-telnet@0.1.1-2?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3476,6 +5030,18 @@ "type": "library", "name": "ruby-power-assert", "version": "1.1.1-1", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "Ruby" + } + } + ], "purl": "pkg:deb/debian/ruby-power-assert@1.1.1-1?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3513,6 +5079,28 @@ "type": "library", "name": "ruby-test-unit", "version": "3.2.8-1", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "Ruby" + } + }, + { + "license": { + "name": "PSF" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + } + ], "purl": "pkg:deb/debian/ruby-test-unit@3.2.8-1?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3550,6 +5138,13 @@ "type": "library", "name": "ruby-xmlrpc", "version": "0.3.0-2", + "licenses": [ + { + "license": { + "name": "Ruby" + } + } + ], "purl": "pkg:deb/debian/ruby-xmlrpc@0.3.0-2?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3587,6 +5182,103 @@ "type": "library", "name": "ruby2.5", "version": "2.5.5-3+deb10u1", + "licenses": [ + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "Ruby" + } + }, + { + "license": { + "name": "Expat" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "SIL-1.1" + } + }, + { + "license": { + "name": "CC-BY-3.0-famfamfam" + } + }, + { + "license": { + "name": "PreserveNotice" + } + }, + { + "license": { + "name": "3C-BSD" + } + }, + { + "license": { + "name": "PublicDomain" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "AllPermissions" + } + }, + { + "license": { + "name": "PartialGplArtisticAndRuby" + } + }, + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "Artistic" + } + }, + { + "license": { + "name": "zlib/libpng" + } + }, + { + "license": { + "name": "GPL-1.0" + } + }, + { + "license": { + "name": "CC0" + } + }, + { + "license": { + "name": "Unicode" + } + }, + { + "license": { + "name": "Permissive" + } + } + ], "purl": "pkg:deb/debian/ruby2.5@2.5.5-3%2Bdeb10u1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3624,6 +5316,18 @@ "type": "library", "name": "ruby", "version": "2.5.1", + "licenses": [ + { + "license": { + "name": "RubyLicense" + } + }, + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/ruby@2.5.1?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { @@ -3661,6 +5365,13 @@ "type": "library", "name": "rubygems-integration", "version": "1.11", + "licenses": [ + { + "license": { + "name": "Expat" + } + } + ], "purl": "pkg:deb/debian/rubygems-integration@1.11?arch=all\u0026distro=debian-10.2", "properties": [ { @@ -3694,6 +5405,13 @@ "type": "library", "name": "sed", "version": "4.7-1", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + } + ], "purl": "pkg:deb/debian/sed@4.7-1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3731,6 +5449,13 @@ "type": "library", "name": "sysvinit-utils", "version": "2.93-8", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/sysvinit-utils@2.93-8?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3768,6 +5493,18 @@ "type": "library", "name": "tar", "version": "1.30+dfsg-6", + "licenses": [ + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "GPL-2.0" + } + } + ], "purl": "pkg:deb/debian/tar@1.30%2Bdfsg-6?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3842,6 +5579,58 @@ "type": "library", "name": "util-linux", "version": "2.33.1-0.1", + "licenses": [ + { + "license": { + "name": "GPL-2.0" + } + }, + { + "license": { + "name": "public-domain" + } + }, + { + "license": { + "name": "BSD-4-Clause" + } + }, + { + "license": { + "name": "MIT" + } + }, + { + "license": { + "name": "BSD-2-Clause" + } + }, + { + "license": { + "name": "BSD-3-Clause" + } + }, + { + "license": { + "name": "LGPL-2.0" + } + }, + { + "license": { + "name": "LGPL-2.1" + } + }, + { + "license": { + "name": "GPL-3.0" + } + }, + { + "license": { + "name": "LGPL-3.0" + } + } + ], "purl": "pkg:deb/debian/util-linux@2.33.1-0.1?arch=amd64\u0026distro=debian-10.2", "properties": [ { @@ -3879,6 +5668,13 @@ "type": "library", "name": "zlib1g", "version": "1.2.11.dfsg-1", + "licenses": [ + { + "license": { + "name": "Zlib" + } + } + ], "purl": "pkg:deb/debian/zlib1g@1.2.11.dfsg-1?arch=amd64\u0026distro=debian-10.2\u0026epoch=1", "properties": [ { diff --git a/pkg/rpc/convert.go b/pkg/rpc/convert.go index e5f5362c4e1b..d3bc29425a4b 100644 --- a/pkg/rpc/convert.go +++ b/pkg/rpc/convert.go @@ -1,7 +1,6 @@ package rpc import ( - "strings" "time" "github.com/samber/lo" @@ -18,6 +17,35 @@ import ( "github.com/aquasecurity/trivy/rpc/scanner" ) +var LicenseCategoryMap = map[common.LicenseCategory_Enum]ftypes.LicenseCategory{ + common.LicenseCategory_UNSPECIFIED: "", + common.LicenseCategory_FORBIDDEN: ftypes.CategoryForbidden, + common.LicenseCategory_RESTRICTED: ftypes.CategoryRestricted, + common.LicenseCategory_RECIPROCAL: ftypes.CategoryReciprocal, + common.LicenseCategory_NOTICE: ftypes.CategoryNotice, + common.LicenseCategory_PERMISSIVE: ftypes.CategoryPermissive, + common.LicenseCategory_UNENCUMBERED: ftypes.CategoryUnencumbered, + common.LicenseCategory_UNKNOWN: ftypes.CategoryUnknown, +} + +var LicenseTypeMap = map[common.LicenseType_Enum]ftypes.LicenseType{ + common.LicenseType_UNSPECIFIED: "", + common.LicenseType_DPKG: ftypes.LicenseTypeDpkg, + common.LicenseType_HEADER: ftypes.LicenseTypeHeader, + common.LicenseType_LICENSE_FILE: ftypes.LicenseTypeFile, +} + +// ByValueOr returns the key from the map of the first matched value, +// or default key if the value is not present. +func ByValueOr[K, V comparable](m map[K]V, val V, d K) K { + for k, v := range m { + if v == val { + return k + } + } + return d +} + // ConvertToRPCPkgs returns the list of RPC package objects func ConvertToRPCPkgs(pkgs []ftypes.Package) []*common.Package { var rpcPkgs []*common.Package @@ -113,6 +141,37 @@ func ConvertToRPCSecretFindings(findings []ftypes.SecretFinding) []*common.Secre return rpcFindings } +func ConvertToRPCLicenseFiles(licenses []ftypes.LicenseFile) []*common.LicenseFile { + var rpcLicenses []*common.LicenseFile + + for _, lic := range licenses { + rpcLicenses = append(rpcLicenses, &common.LicenseFile{ + LicenseType: ConvertToRPCLicenseType(lic.Type), + FilePath: lic.FilePath, + PkgName: lic.PkgName, + Fingings: ConvertToRPCLicenseFindings(lic.Findings), + Layer: ConvertToRPCLayer(lic.Layer), + }) + } + + return rpcLicenses +} + +func ConvertToRPCLicenseFindings(findings ftypes.LicenseFindings) []*common.LicenseFinding { + var rpcFindings []*common.LicenseFinding + + for _, f := range findings { + rpcFindings = append(rpcFindings, &common.LicenseFinding{ + Category: ConvertToRPCLicenseCategory(f.Category), + Name: f.Name, + Confidence: float32(f.Confidence), + Link: f.Link, + }) + } + + return rpcFindings +} + // ConvertFromRPCPkgs returns list of Fanal package objects func ConvertFromRPCPkgs(rpcPkgs []*common.Package) []ftypes.Package { var pkgs []ftypes.Package @@ -296,13 +355,13 @@ func ConvertFromRPCResults(rpcResults []*scanner.Result) []types.Result { Packages: ConvertFromRPCPkgs(result.Packages), CustomResources: ConvertFromRPCCustomResources(result.CustomResources), Secrets: ConvertFromRPCSecretFindings(result.Secrets), - Licenses: ConvertFromRPCLicenses(result.Licenses), + Licenses: ConvertFromRPCDetectedLicenses(result.Licenses), }) } return results } -func ConvertFromRPCLicenses(rpcLicenses []*common.DetectedLicense) []types.DetectedLicense { +func ConvertFromRPCDetectedLicenses(rpcLicenses []*common.DetectedLicense) []types.DetectedLicense { var licenses []types.DetectedLicense for _, l := range rpcLicenses { severity := dbTypes.Severity(l.Severity) @@ -319,11 +378,12 @@ func ConvertFromRPCLicenses(rpcLicenses []*common.DetectedLicense) []types.Detec return licenses } -func ConvertFromRPCLicenseCategory(rpcCategory common.DetectedLicense_LicenseCategory) ftypes.LicenseCategory { - if rpcCategory == common.DetectedLicense_UNSPECIFIED { - return "" - } - return ftypes.LicenseCategory(strings.ToLower(rpcCategory.String())) +func ConvertFromRPCLicenseCategory(rpcCategory common.LicenseCategory_Enum) ftypes.LicenseCategory { + return lo.ValueOr(LicenseCategoryMap, rpcCategory, "") +} + +func ConvertFromRPCLicenseType(rpcLicenseType common.LicenseType_Enum) ftypes.LicenseType { + return lo.ValueOr(LicenseTypeMap, rpcLicenseType, "") } // ConvertFromRPCCustomResources converts array of cache.CustomResource to fanal.CustomResource @@ -395,6 +455,37 @@ func ConvertFromRPCSecrets(recSecrets []*common.Secret) []ftypes.Secret { return secrets } +func ConvertFromRPCLicenseFiles(rpcLicenses []*common.LicenseFile) []ftypes.LicenseFile { + var licenses []ftypes.LicenseFile + + for _, lic := range rpcLicenses { + licenses = append(licenses, ftypes.LicenseFile{ + Type: ConvertFromRPCLicenseType(lic.LicenseType), + FilePath: lic.FilePath, + PkgName: lic.PkgName, + Findings: ConvertFromRPCLicenseFindings(lic.Fingings), + Layer: ConvertFromRPCLayer(lic.Layer), + }) + } + + return licenses +} + +func ConvertFromRPCLicenseFindings(rpcFindings []*common.LicenseFinding) ftypes.LicenseFindings { + var findings ftypes.LicenseFindings + + for _, finding := range rpcFindings { + findings = append(findings, ftypes.LicenseFinding{ + Category: ConvertFromRPCLicenseCategory(finding.Category), + Name: finding.Name, + Confidence: float64(finding.Confidence), + Link: finding.Link, + }) + } + + return findings +} + // ConvertFromRPCVulns converts []*common.Vulnerability to []types.DetectedVulnerability func ConvertFromRPCVulns(rpcVulns []*common.Vulnerability) []types.DetectedVulnerability { var vulns []types.DetectedVulnerability @@ -640,6 +731,7 @@ func ConvertFromRPCPutBlobRequest(req *cache.PutBlobRequest) ftypes.BlobInfo { WhiteoutFiles: req.BlobInfo.WhiteoutFiles, CustomResources: ConvertFromRPCCustomResources(req.BlobInfo.CustomResources), Secrets: ConvertFromRPCSecrets(req.BlobInfo.Secrets), + Licenses: ConvertFromRPCLicenseFiles(req.BlobInfo.Licenses), } } @@ -750,6 +842,7 @@ func ConvertToRPCPutBlobRequest(diffID string, blobInfo ftypes.BlobInfo) *cache. WhiteoutFiles: blobInfo.WhiteoutFiles, CustomResources: customResources, Secrets: ConvertToRPCSecrets(blobInfo.Secrets), + Licenses: ConvertToRPCLicenseFiles(blobInfo.Licenses), }, } } @@ -820,12 +913,12 @@ func ConvertToRPCLicenses(licenses []types.DetectedLicense) []*common.DetectedLi return rpcLicenses } -func ConvertToRPCLicenseCategory(category ftypes.LicenseCategory) common.DetectedLicense_LicenseCategory { - rpcCategory, ok := common.DetectedLicense_LicenseCategory_value[strings.ToUpper(string(category))] - if !ok { - return common.DetectedLicense_UNSPECIFIED - } - return common.DetectedLicense_LicenseCategory(rpcCategory) +func ConvertToRPCLicenseCategory(category ftypes.LicenseCategory) common.LicenseCategory_Enum { + return ByValueOr(LicenseCategoryMap, category, common.LicenseCategory_UNSPECIFIED) +} + +func ConvertToRPCLicenseType(ty ftypes.LicenseType) common.LicenseType_Enum { + return ByValueOr(LicenseTypeMap, ty, common.LicenseType_UNSPECIFIED) } func ConvertToDeleteBlobsRequest(blobIDs []string) *cache.DeleteBlobsRequest { diff --git a/pkg/rpc/convert_test.go b/pkg/rpc/convert_test.go index 038d24536557..e804e50bcb08 100644 --- a/pkg/rpc/convert_test.go +++ b/pkg/rpc/convert_test.go @@ -704,7 +704,7 @@ func TestConvertFromRPCLicenses(t *testing.T) { rpcLicenses: []*common.DetectedLicense{ { Severity: common.Severity_HIGH, - Category: common.DetectedLicense_RESTRICTED, + Category: common.LicenseCategory_RESTRICTED, PkgName: "alpine-baselayout", FilePath: "some-path", Name: "GPL-2.0", @@ -733,7 +733,7 @@ func TestConvertFromRPCLicenses(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := ConvertFromRPCLicenses(tt.rpcLicenses) + got := ConvertFromRPCDetectedLicenses(tt.rpcLicenses) assert.Equal(t, tt.want, got) }) } @@ -761,7 +761,7 @@ func TestConvertToRPCLicenses(t *testing.T) { want: []*common.DetectedLicense{ { Severity: common.Severity_HIGH, - Category: common.DetectedLicense_RESTRICTED, + Category: common.LicenseCategory_RESTRICTED, PkgName: "alpine-baselayout", FilePath: "some-path", Name: "GPL-2.0", @@ -789,17 +789,17 @@ func TestConvertToRPCLicenseCategory(t *testing.T) { tests := []struct { name string category ftypes.LicenseCategory - want common.DetectedLicense_LicenseCategory + want common.LicenseCategory_Enum }{ { name: "happy", category: ftypes.CategoryNotice, - want: common.DetectedLicense_NOTICE, + want: common.LicenseCategory_NOTICE, }, { name: "unspecified", category: "", - want: common.DetectedLicense_UNSPECIFIED, + want: common.LicenseCategory_UNSPECIFIED, }, } @@ -814,17 +814,17 @@ func TestConvertToRPCLicenseCategory(t *testing.T) { func TestConvertFromRPCLicenseCategory(t *testing.T) { tests := []struct { name string - rpcCategory common.DetectedLicense_LicenseCategory + rpcCategory common.LicenseCategory_Enum want ftypes.LicenseCategory }{ { name: "happy", - rpcCategory: common.DetectedLicense_RESTRICTED, + rpcCategory: common.LicenseCategory_RESTRICTED, want: ftypes.CategoryRestricted, }, { name: "unspecified", - rpcCategory: common.DetectedLicense_UNSPECIFIED, + rpcCategory: common.LicenseCategory_UNSPECIFIED, want: "", }, } @@ -836,3 +836,167 @@ func TestConvertFromRPCLicenseCategory(t *testing.T) { }) } } + +func TestConvertToRPCLicenseType(t *testing.T) { + tests := []struct { + name string + ty ftypes.LicenseType + want common.LicenseType_Enum + }{ + { + name: "happy", + ty: ftypes.LicenseTypeFile, + want: common.LicenseType_LICENSE_FILE, + }, + { + name: "unspecified", + ty: "", + want: common.LicenseType_UNSPECIFIED, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := ConvertToRPCLicenseType(tt.ty) + assert.Equal(t, tt.want, got) + }) + } +} + +func TestConvertFromRPCLicenseType(t *testing.T) { + tests := []struct { + name string + rpcType common.LicenseType_Enum + want ftypes.LicenseType + }{ + { + name: "happy", + rpcType: common.LicenseType_LICENSE_FILE, + want: ftypes.LicenseTypeFile, + }, + { + name: "unspecified", + rpcType: common.LicenseType_UNSPECIFIED, + want: "", + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + got := ConvertFromRPCLicenseType(tt.rpcType) + assert.Equal(t, tt.want, got) + }) + } +} + +func TestConvertToRPCLicenseFiles(t *testing.T) { + tests := []struct { + name string + licenseFiles []ftypes.LicenseFile + want []*common.LicenseFile + }{ + { + name: "happy", + licenseFiles: []ftypes.LicenseFile{ + { + Type: ftypes.LicenseTypeFile, + PkgName: "alpine-baselayout", + FilePath: "some-path", + Findings: ftypes.LicenseFindings{ + { + Category: ftypes.CategoryRestricted, + Name: "GPL-2.0", + Confidence: 1, + Link: "https://some-link", + }, + }, + Layer: ftypes.Layer{ + Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", + DiffID: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", + }, + }, + }, + want: []*common.LicenseFile{ + { + LicenseType: common.LicenseType_LICENSE_FILE, + PkgName: "alpine-baselayout", + FilePath: "some-path", + Fingings: []*common.LicenseFinding{ + { + Category: common.LicenseCategory_RESTRICTED, + Name: "GPL-2.0", + Confidence: 1, + Link: "https://some-link", + }, + }, + Layer: &common.Layer{ + Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", + DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, ConvertToRPCLicenseFiles(tt.licenseFiles)) + }) + } +} + +func TestConvertFromRPCLicenseFiles(t *testing.T) { + tests := []struct { + name string + licenseFiles []*common.LicenseFile + want []ftypes.LicenseFile + }{ + { + name: "happy", + licenseFiles: []*common.LicenseFile{ + { + LicenseType: common.LicenseType_LICENSE_FILE, + PkgName: "alpine-baselayout", + FilePath: "some-path", + Fingings: []*common.LicenseFinding{ + { + Category: common.LicenseCategory_RESTRICTED, + Name: "GPL-2.0", + Confidence: 1, + Link: "https://some-link", + }, + }, + Layer: &common.Layer{ + Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", + DiffId: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", + }, + }, + }, + want: []ftypes.LicenseFile{ + { + Type: ftypes.LicenseTypeFile, + PkgName: "alpine-baselayout", + FilePath: "some-path", + Findings: ftypes.LicenseFindings{ + { + Category: ftypes.CategoryRestricted, + Name: "GPL-2.0", + Confidence: 1, + Link: "https://some-link", + }, + }, + Layer: ftypes.Layer{ + Digest: "sha256:154ad0735c360b212b167f424d33a62305770a1fcfb6363882f5c436cfbd9812", + DiffID: "sha256:b2a1a2d80bf0c747a4f6b0ca6af5eef23f043fcdb1ed4f3a3e750aef2dc68079", + }, + }, + }, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + assert.Equal(t, tt.want, ConvertFromRPCLicenseFiles(tt.licenseFiles)) + }) + } +} diff --git a/rpc/cache/service.pb.go b/rpc/cache/service.pb.go index c7f5ee1361de..d3a1fa1a63b9 100644 --- a/rpc/cache/service.pb.go +++ b/rpc/cache/service.pb.go @@ -182,6 +182,7 @@ type BlobInfo struct { DiffId string `protobuf:"bytes,8,opt,name=diff_id,json=diffId,proto3" json:"diff_id,omitempty"` CustomResources []*common.CustomResource `protobuf:"bytes,10,rep,name=custom_resources,json=customResources,proto3" json:"custom_resources,omitempty"` Secrets []*common.Secret `protobuf:"bytes,12,rep,name=secrets,proto3" json:"secrets,omitempty"` + Licenses []*common.LicenseFile `protobuf:"bytes,13,rep,name=licenses,proto3" json:"licenses,omitempty"` } func (x *BlobInfo) Reset() { @@ -300,6 +301,13 @@ func (x *BlobInfo) GetSecrets() []*common.Secret { return nil } +func (x *BlobInfo) GetLicenses() []*common.LicenseFile { + if x != nil { + return x.Licenses + } + return nil +} + type PutBlobRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -602,7 +610,7 @@ var file_rpc_cache_service_proto_rawDesc = []byte{ 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xcc, 0x04, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x49, + 0x63, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x83, 0x05, 0x0a, 0x08, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0d, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x02, 0x6f, 0x73, @@ -639,56 +647,59 @@ var file_rpc_cache_service_proto_rawDesc = []byte{ 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x52, 0x07, 0x73, 0x65, - 0x63, 0x72, 0x65, 0x74, 0x73, 0x22, 0x60, 0x0a, 0x0e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x69, 0x66, 0x66, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x66, 0x66, 0x49, 0x64, - 0x12, 0x35, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, - 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x43, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x02, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, - 0x6e, 0x2e, 0x4f, 0x53, 0x52, 0x02, 0x6f, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x65, 0x6f, 0x73, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x65, 0x6f, 0x73, 0x6c, 0x22, 0x51, 0x0a, 0x13, - 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, - 0x6b, 0x0a, 0x14, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x6d, 0x69, 0x73, 0x73, 0x69, - 0x6e, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, - 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x12, - 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x32, 0xbb, 0x02, - 0x0a, 0x05, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, - 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x2e, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, + 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, + 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x46, 0x69, + 0x6c, 0x65, 0x52, 0x08, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x60, 0x0a, 0x0e, + 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, + 0x0a, 0x07, 0x64, 0x69, 0x66, 0x66, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x64, 0x69, 0x66, 0x66, 0x49, 0x64, 0x12, 0x35, 0x0a, 0x09, 0x62, 0x6c, 0x6f, 0x62, 0x5f, + 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x74, 0x72, 0x69, + 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x62, 0x6c, 0x6f, 0x62, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x43, + 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, + 0x02, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x72, 0x69, 0x76, + 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x53, 0x52, 0x02, 0x6f, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x65, 0x6f, 0x73, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x65, + 0x6f, 0x73, 0x6c, 0x22, 0x51, 0x0a, 0x13, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, + 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x49, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x62, + 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, + 0x6c, 0x6f, 0x62, 0x49, 0x64, 0x73, 0x22, 0x6b, 0x0a, 0x14, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x61, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, + 0x67, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0e, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, + 0x49, 0x64, 0x73, 0x22, 0x2f, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, + 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x62, 0x6c, 0x6f, + 0x62, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x62, 0x6c, 0x6f, + 0x62, 0x49, 0x64, 0x73, 0x32, 0xbb, 0x02, 0x0a, 0x05, 0x43, 0x61, 0x63, 0x68, 0x65, 0x12, 0x49, + 0x0a, 0x0b, 0x50, 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x59, 0x0a, 0x0c, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, - 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x23, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, - 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, - 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x72, 0x69, - 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, - 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x49, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, - 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, - 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x71, 0x75, 0x61, 0x73, 0x65, - 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2f, 0x72, 0x70, 0x63, - 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x63, 0x61, 0x63, 0x68, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x75, 0x74, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x41, 0x0a, 0x07, 0x50, 0x75, 0x74, + 0x42, 0x6c, 0x6f, 0x62, 0x12, 0x1e, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, + 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x59, 0x0a, 0x0c, + 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x23, 0x2e, 0x74, + 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x69, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x24, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x61, 0x63, 0x68, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x49, 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, + 0x65, 0x42, 0x6c, 0x6f, 0x62, 0x73, 0x12, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, + 0x61, 0x63, 0x68, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x42, 0x6c, + 0x6f, 0x62, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, + 0x74, 0x79, 0x42, 0x2f, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x61, 0x71, 0x75, 0x61, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, + 0x69, 0x76, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x61, 0x63, 0x68, 0x65, 0x3b, 0x63, 0x61, + 0x63, 0x68, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -722,7 +733,8 @@ var file_rpc_cache_service_proto_goTypes = []interface{}{ (*common.Misconfiguration)(nil), // 14: trivy.common.Misconfiguration (*common.CustomResource)(nil), // 15: trivy.common.CustomResource (*common.Secret)(nil), // 16: trivy.common.Secret - (*emptypb.Empty)(nil), // 17: google.protobuf.Empty + (*common.LicenseFile)(nil), // 17: trivy.common.LicenseFile + (*emptypb.Empty)(nil), // 18: google.protobuf.Empty } var file_rpc_cache_service_proto_depIdxs = []int32{ 8, // 0: trivy.cache.v1.ArtifactInfo.created:type_name -> google.protobuf.Timestamp @@ -735,21 +747,22 @@ var file_rpc_cache_service_proto_depIdxs = []int32{ 14, // 7: trivy.cache.v1.BlobInfo.misconfigurations:type_name -> trivy.common.Misconfiguration 15, // 8: trivy.cache.v1.BlobInfo.custom_resources:type_name -> trivy.common.CustomResource 16, // 9: trivy.cache.v1.BlobInfo.secrets:type_name -> trivy.common.Secret - 2, // 10: trivy.cache.v1.PutBlobRequest.blob_info:type_name -> trivy.cache.v1.BlobInfo - 10, // 11: trivy.cache.v1.PutResponse.os:type_name -> trivy.common.OS - 1, // 12: trivy.cache.v1.Cache.PutArtifact:input_type -> trivy.cache.v1.PutArtifactRequest - 3, // 13: trivy.cache.v1.Cache.PutBlob:input_type -> trivy.cache.v1.PutBlobRequest - 5, // 14: trivy.cache.v1.Cache.MissingBlobs:input_type -> trivy.cache.v1.MissingBlobsRequest - 7, // 15: trivy.cache.v1.Cache.DeleteBlobs:input_type -> trivy.cache.v1.DeleteBlobsRequest - 17, // 16: trivy.cache.v1.Cache.PutArtifact:output_type -> google.protobuf.Empty - 17, // 17: trivy.cache.v1.Cache.PutBlob:output_type -> google.protobuf.Empty - 6, // 18: trivy.cache.v1.Cache.MissingBlobs:output_type -> trivy.cache.v1.MissingBlobsResponse - 17, // 19: trivy.cache.v1.Cache.DeleteBlobs:output_type -> google.protobuf.Empty - 16, // [16:20] is the sub-list for method output_type - 12, // [12:16] is the sub-list for method input_type - 12, // [12:12] is the sub-list for extension type_name - 12, // [12:12] is the sub-list for extension extendee - 0, // [0:12] is the sub-list for field type_name + 17, // 10: trivy.cache.v1.BlobInfo.licenses:type_name -> trivy.common.LicenseFile + 2, // 11: trivy.cache.v1.PutBlobRequest.blob_info:type_name -> trivy.cache.v1.BlobInfo + 10, // 12: trivy.cache.v1.PutResponse.os:type_name -> trivy.common.OS + 1, // 13: trivy.cache.v1.Cache.PutArtifact:input_type -> trivy.cache.v1.PutArtifactRequest + 3, // 14: trivy.cache.v1.Cache.PutBlob:input_type -> trivy.cache.v1.PutBlobRequest + 5, // 15: trivy.cache.v1.Cache.MissingBlobs:input_type -> trivy.cache.v1.MissingBlobsRequest + 7, // 16: trivy.cache.v1.Cache.DeleteBlobs:input_type -> trivy.cache.v1.DeleteBlobsRequest + 18, // 17: trivy.cache.v1.Cache.PutArtifact:output_type -> google.protobuf.Empty + 18, // 18: trivy.cache.v1.Cache.PutBlob:output_type -> google.protobuf.Empty + 6, // 19: trivy.cache.v1.Cache.MissingBlobs:output_type -> trivy.cache.v1.MissingBlobsResponse + 18, // 20: trivy.cache.v1.Cache.DeleteBlobs:output_type -> google.protobuf.Empty + 17, // [17:21] is the sub-list for method output_type + 13, // [13:17] is the sub-list for method input_type + 13, // [13:13] is the sub-list for extension type_name + 13, // [13:13] is the sub-list for extension extendee + 0, // [0:13] is the sub-list for field type_name } func init() { file_rpc_cache_service_proto_init() } diff --git a/rpc/cache/service.proto b/rpc/cache/service.proto index 132c82a52391..a1b113a202c7 100644 --- a/rpc/cache/service.proto +++ b/rpc/cache/service.proto @@ -41,6 +41,7 @@ message BlobInfo { string diff_id = 8; repeated common.CustomResource custom_resources = 10; repeated common.Secret secrets = 12; + repeated common.LicenseFile licenses = 13; } message PutBlobRequest { diff --git a/rpc/cache/service.twirp.go b/rpc/cache/service.twirp.go index 3fd2ca8b5f62..f5f138ef5091 100644 --- a/rpc/cache/service.twirp.go +++ b/rpc/cache/service.twirp.go @@ -1933,56 +1933,57 @@ func callClientError(ctx context.Context, h *twirp.ClientHooks, err twirp.Error) } var twirpFileDescriptor0 = []byte{ - // 808 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xef, 0x6e, 0xfb, 0x34, - 0x14, 0x55, 0xff, 0x6c, 0x6d, 0x6f, 0xff, 0xac, 0x98, 0x1f, 0x5b, 0x56, 0xa6, 0xad, 0x0a, 0x20, - 0x95, 0x0f, 0x24, 0xa2, 0x80, 0x84, 0x84, 0x40, 0x74, 0x1b, 0xa0, 0x4a, 0x4c, 0x14, 0x0f, 0x21, - 0xc1, 0x97, 0x92, 0x3a, 0x4e, 0x6b, 0xad, 0x89, 0x33, 0xdb, 0x29, 0xf4, 0x0d, 0x78, 0x27, 0x5e, - 0x81, 0x87, 0x42, 0x76, 0x92, 0xb6, 0x69, 0xbb, 0x89, 0xdf, 0x97, 0x2a, 0xbe, 0xf7, 0xf8, 0xf8, - 0xdc, 0xe3, 0x93, 0x14, 0x2e, 0x44, 0x4c, 0x5c, 0xe2, 0x91, 0x05, 0x75, 0x25, 0x15, 0x2b, 0x46, - 0xa8, 0x13, 0x0b, 0xae, 0x38, 0xea, 0x28, 0xc1, 0x56, 0x6b, 0xc7, 0xb4, 0x9c, 0xd5, 0xa7, 0xbd, - 0x9b, 0x39, 0xe7, 0xf3, 0x25, 0x75, 0x4d, 0x77, 0x96, 0x04, 0xae, 0x62, 0x21, 0x95, 0xca, 0x0b, - 0xe3, 0x74, 0x43, 0xcf, 0x32, 0x4c, 0x3c, 0x0c, 0x79, 0x54, 0xa4, 0xea, 0xbd, 0xbf, 0xbf, 0x95, - 0x86, 0xb1, 0x5a, 0xa7, 0x4d, 0xfb, 0xef, 0x32, 0xb4, 0x46, 0x42, 0xb1, 0xc0, 0x23, 0x6a, 0x1c, - 0x05, 0x1c, 0x7d, 0x04, 0x1d, 0x49, 0x16, 0x34, 0xf4, 0xa6, 0x2b, 0x2a, 0x24, 0xe3, 0x91, 0x55, - 0xea, 0x97, 0x06, 0x27, 0xb8, 0x9d, 0x56, 0x7f, 0x4d, 0x8b, 0xc8, 0x86, 0x96, 0x27, 0xc8, 0x82, - 0x29, 0x4a, 0x54, 0x22, 0xa8, 0x55, 0xee, 0x97, 0x06, 0x0d, 0x5c, 0xa8, 0xa1, 0xcf, 0xa1, 0x46, - 0x04, 0xf5, 0x14, 0xf5, 0xad, 0x4a, 0xbf, 0x34, 0x68, 0x0e, 0x7b, 0x4e, 0x2a, 0xc5, 0xc9, 0xa5, - 0x38, 0xbf, 0xe4, 0x53, 0xe0, 0x1c, 0xaa, 0x05, 0xf8, 0x9c, 0x3c, 0x51, 0xb1, 0x11, 0x50, 0x35, - 0xdc, 0xed, 0xb4, 0x9a, 0x0b, 0xe8, 0x40, 0x99, 0x4b, 0xeb, 0xc4, 0xb4, 0xca, 0x5c, 0xa2, 0x6f, - 0xa1, 0xbb, 0x60, 0x52, 0x71, 0xb1, 0x9e, 0xc6, 0x1e, 0x79, 0xf2, 0xe6, 0x54, 0x5a, 0xa7, 0xfd, - 0xca, 0xa0, 0x39, 0x7c, 0xcf, 0xc9, 0xbc, 0x34, 0xe6, 0x38, 0x93, 0xb4, 0x8b, 0xcf, 0x32, 0x78, - 0xb6, 0x96, 0xf6, 0x5f, 0x80, 0x26, 0x89, 0xca, 0xcd, 0xc0, 0xf4, 0x39, 0xa1, 0x52, 0xa1, 0x1b, - 0x68, 0x7a, 0x59, 0x69, 0xca, 0x7c, 0x63, 0x46, 0x03, 0x43, 0x5e, 0x1a, 0xfb, 0x68, 0x04, 0xed, - 0x2d, 0x20, 0x0a, 0xb8, 0xb1, 0xa2, 0x39, 0xbc, 0x72, 0x8a, 0x37, 0xe8, 0xec, 0xba, 0xac, 0x8d, - 0xda, 0xae, 0xec, 0x7f, 0xab, 0x50, 0xbf, 0x5d, 0xf2, 0xd9, 0xdb, 0x5c, 0x40, 0xdf, 0xcc, 0x9f, - 0x9e, 0xd5, 0x2d, 0x4e, 0xf8, 0xd3, 0xa3, 0x71, 0xe4, 0x4b, 0x00, 0x41, 0x63, 0x2e, 0x99, 0x9e, - 0xd2, 0x6a, 0x1a, 0xa4, 0x55, 0x44, 0xe2, 0x4d, 0x1f, 0xef, 0x60, 0xd1, 0x37, 0xd0, 0xce, 0x3c, - 0x34, 0x13, 0x49, 0xab, 0x62, 0x8c, 0xbc, 0x3c, 0x6a, 0x64, 0x3a, 0x4f, 0xbc, 0x5d, 0x48, 0xf4, - 0x35, 0xb4, 0xbc, 0x38, 0x5e, 0x32, 0xe2, 0x29, 0xc6, 0x23, 0x69, 0x55, 0x8f, 0x6d, 0x1f, 0x6d, - 0x11, 0xb8, 0x00, 0x47, 0x3f, 0xc2, 0x3b, 0x21, 0x93, 0x84, 0x47, 0x01, 0x9b, 0x27, 0x22, 0xe3, - 0x68, 0x18, 0x8e, 0xeb, 0x22, 0xc7, 0xc3, 0x1e, 0x0c, 0x1f, 0x6e, 0xd4, 0x17, 0xc8, 0x63, 0xef, - 0x39, 0xa1, 0x53, 0x9f, 0x09, 0x9d, 0x98, 0x8a, 0xbe, 0xc0, 0xb4, 0x74, 0xcf, 0x84, 0xd4, 0x86, - 0xff, 0xa9, 0x43, 0xcb, 0x13, 0x35, 0x0d, 0xd8, 0x32, 0xcb, 0x4d, 0x03, 0xb7, 0xf3, 0xea, 0xf7, - 0xba, 0x88, 0xce, 0xe1, 0xd4, 0x67, 0x73, 0x2a, 0x95, 0x55, 0x33, 0x19, 0xc8, 0x56, 0xe8, 0x02, - 0x6a, 0x3e, 0x0b, 0x02, 0x1d, 0x8e, 0x7a, 0xde, 0x08, 0x82, 0xb1, 0x8f, 0x7e, 0x80, 0x2e, 0x49, - 0xa4, 0xe2, 0xe1, 0x54, 0x50, 0xc9, 0x13, 0x41, 0xa8, 0xb4, 0xc0, 0x4c, 0x71, 0x55, 0x9c, 0xe2, - 0xce, 0xa0, 0x70, 0x06, 0xc2, 0x67, 0xa4, 0xb0, 0x96, 0xc8, 0x81, 0x9a, 0xa4, 0x44, 0x50, 0x25, - 0xad, 0x96, 0xd9, 0xff, 0xa6, 0xb8, 0xff, 0xd1, 0x34, 0x71, 0x0e, 0xb2, 0xff, 0x80, 0xce, 0x24, - 0x51, 0x3a, 0x50, 0x79, 0x88, 0x77, 0x34, 0x96, 0x0a, 0x1a, 0xbf, 0x80, 0xc6, 0x6c, 0xc9, 0x67, - 0x69, 0x70, 0x2b, 0xc5, 0x88, 0xe4, 0xc1, 0xcd, 0x93, 0x89, 0xeb, 0xb3, 0xec, 0xc9, 0xbe, 0x83, - 0xe6, 0x24, 0x51, 0x98, 0xca, 0x98, 0x47, 0x92, 0x66, 0x59, 0x2c, 0xbd, 0x92, 0x45, 0x04, 0x55, - 0xca, 0xe5, 0xd2, 0xe4, 0xb5, 0x8e, 0xcd, 0xb3, 0xfd, 0x33, 0xbc, 0xfb, 0xc0, 0xa4, 0x64, 0xd1, - 0x5c, 0x9f, 0x20, 0xff, 0xf7, 0x0b, 0x77, 0x09, 0xf5, 0x54, 0xb3, 0xaf, 0xf3, 0xaf, 0x6f, 0xaa, - 0x66, 0x84, 0xf9, 0xd2, 0x7e, 0x82, 0x37, 0x45, 0xca, 0x4c, 0xe0, 0xc7, 0xd0, 0x0d, 0xd3, 0xfa, - 0x34, 0x27, 0x32, 0xc4, 0x75, 0x7c, 0x96, 0xd5, 0xf3, 0xb7, 0x13, 0x0d, 0xb6, 0xd0, 0xbd, 0x53, - 0x3a, 0xe1, 0x96, 0x5a, 0x1f, 0xe6, 0x02, 0xba, 0xa7, 0x4b, 0xaa, 0x68, 0x41, 0xfe, 0xae, 0xba, - 0x52, 0x41, 0xdd, 0xf0, 0x9f, 0x32, 0x9c, 0xdc, 0x69, 0x57, 0xd1, 0xd8, 0xf8, 0xb7, 0x39, 0xd3, - 0xde, 0xb7, 0xfc, 0xf0, 0x3b, 0xd4, 0x3b, 0x3f, 0xf8, 0x76, 0x7e, 0xa7, 0x3f, 0xe3, 0x68, 0x04, - 0xb5, 0xec, 0xb2, 0xd1, 0xf5, 0x11, 0x9a, 0x9d, 0x14, 0xbc, 0x48, 0xf1, 0x1b, 0xb4, 0x76, 0x5d, - 0x43, 0x1f, 0xec, 0xf3, 0x1c, 0xb9, 0xa6, 0xde, 0x87, 0xaf, 0x83, 0x32, 0xe3, 0xc7, 0xd0, 0xdc, - 0xf1, 0xe8, 0x70, 0xd0, 0x43, 0x03, 0x5f, 0x52, 0x79, 0xeb, 0xfe, 0xfe, 0xc9, 0x9c, 0xa9, 0x45, - 0x32, 0xd3, 0xd1, 0x72, 0xbd, 0xe7, 0xc4, 0x93, 0x94, 0x24, 0x82, 0xa9, 0xb5, 0x6b, 0x48, 0xdd, - 0xcd, 0x5f, 0xe9, 0x57, 0xe6, 0x77, 0x76, 0x6a, 0x08, 0x3e, 0xfb, 0x2f, 0x00, 0x00, 0xff, 0xff, - 0xd6, 0x90, 0xcf, 0x6c, 0x64, 0x07, 0x00, 0x00, + // 830 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xdf, 0x8f, 0xdb, 0x44, + 0x10, 0x56, 0x92, 0xbb, 0x4b, 0x32, 0xf9, 0x71, 0xc7, 0x52, 0x5a, 0x37, 0x54, 0x6d, 0x64, 0x40, + 0x0a, 0x0f, 0xd8, 0xe2, 0xa0, 0x12, 0x12, 0x02, 0x71, 0xbd, 0x02, 0x8a, 0xd4, 0x8a, 0x63, 0x8b, + 0x90, 0xe0, 0x25, 0x38, 0xeb, 0x75, 0xb2, 0x3a, 0xdb, 0xeb, 0xdb, 0x59, 0x07, 0xf2, 0xcc, 0x0b, + 0xff, 0x13, 0xff, 0x1c, 0xda, 0xb5, 0x9d, 0xc4, 0x49, 0x7a, 0xa2, 0x2f, 0x91, 0x77, 0xe6, 0x9b, + 0x6f, 0x67, 0xbe, 0xf9, 0xec, 0xc0, 0x23, 0x95, 0x31, 0x9f, 0x05, 0x6c, 0xc9, 0x7d, 0xe4, 0x6a, + 0x25, 0x18, 0xf7, 0x32, 0x25, 0xb5, 0x24, 0x43, 0xad, 0xc4, 0x6a, 0xed, 0xd9, 0x94, 0xb7, 0xfa, + 0x7c, 0xf4, 0x6c, 0x21, 0xe5, 0x22, 0xe6, 0xbe, 0xcd, 0xce, 0xf3, 0xc8, 0xd7, 0x22, 0xe1, 0xa8, + 0x83, 0x24, 0x2b, 0x0a, 0x46, 0x8e, 0x65, 0x92, 0x49, 0x22, 0xd3, 0x3a, 0xd5, 0xe8, 0xc3, 0xfd, + 0x52, 0x9e, 0x64, 0x7a, 0x5d, 0x24, 0xdd, 0x7f, 0x9a, 0xd0, 0xbf, 0x52, 0x5a, 0x44, 0x01, 0xd3, + 0xd3, 0x34, 0x92, 0xe4, 0x13, 0x18, 0x22, 0x5b, 0xf2, 0x24, 0x98, 0xad, 0xb8, 0x42, 0x21, 0x53, + 0xa7, 0x31, 0x6e, 0x4c, 0x4e, 0xe9, 0xa0, 0x88, 0xfe, 0x5a, 0x04, 0x89, 0x0b, 0xfd, 0x40, 0xb1, + 0xa5, 0xd0, 0x9c, 0xe9, 0x5c, 0x71, 0xa7, 0x39, 0x6e, 0x4c, 0xba, 0xb4, 0x16, 0x23, 0x5f, 0x42, + 0x9b, 0x29, 0x1e, 0x68, 0x1e, 0x3a, 0xad, 0x71, 0x63, 0xd2, 0xbb, 0x1c, 0x79, 0x45, 0x2b, 0x5e, + 0xd5, 0x8a, 0xf7, 0x4b, 0x35, 0x05, 0xad, 0xa0, 0xa6, 0x81, 0x50, 0xb2, 0x5b, 0xae, 0x36, 0x0d, + 0x9c, 0x58, 0xee, 0x41, 0x11, 0xad, 0x1a, 0x18, 0x42, 0x53, 0xa2, 0x73, 0x6a, 0x53, 0x4d, 0x89, + 0xe4, 0x3b, 0xb8, 0x58, 0x0a, 0xd4, 0x52, 0xad, 0x67, 0x59, 0xc0, 0x6e, 0x83, 0x05, 0x47, 0xe7, + 0x6c, 0xdc, 0x9a, 0xf4, 0x2e, 0x3f, 0xf0, 0x4a, 0x2d, 0xad, 0x38, 0xde, 0x4d, 0x91, 0xa5, 0xe7, + 0x25, 0xbc, 0x3c, 0xa3, 0xfb, 0x17, 0x90, 0x9b, 0x5c, 0x57, 0x62, 0x50, 0x7e, 0x97, 0x73, 0xd4, + 0xe4, 0x19, 0xf4, 0x82, 0x32, 0x34, 0x13, 0xa1, 0x15, 0xa3, 0x4b, 0xa1, 0x0a, 0x4d, 0x43, 0x72, + 0x05, 0x83, 0x2d, 0x20, 0x8d, 0xa4, 0x95, 0xa2, 0x77, 0xf9, 0xc4, 0xab, 0x6f, 0xd0, 0xdb, 0x55, + 0xd9, 0x08, 0xb5, 0x3d, 0xb9, 0x7f, 0x9f, 0x42, 0xe7, 0x45, 0x2c, 0xe7, 0xef, 0xb2, 0x80, 0xb1, + 0x9d, 0xbf, 0xb8, 0xeb, 0xa2, 0x3e, 0xe1, 0x4f, 0x6f, 0xac, 0x22, 0x5f, 0x01, 0x28, 0x9e, 0x49, + 0x14, 0x66, 0x4a, 0xa7, 0x67, 0x91, 0x4e, 0x1d, 0x49, 0x37, 0x79, 0xba, 0x83, 0x25, 0xdf, 0xc2, + 0xa0, 0xd4, 0xd0, 0x4e, 0x84, 0x4e, 0xcb, 0x0a, 0xf9, 0xf8, 0xa8, 0x90, 0xc5, 0x3c, 0xd9, 0xf6, + 0x80, 0xe4, 0x1b, 0xe8, 0x07, 0x59, 0x16, 0x0b, 0x16, 0x68, 0x21, 0x53, 0x74, 0x4e, 0x8e, 0x95, + 0x5f, 0x6d, 0x11, 0xb4, 0x06, 0x27, 0xaf, 0xe0, 0xbd, 0x44, 0x20, 0x93, 0x69, 0x24, 0x16, 0xb9, + 0x2a, 0x39, 0xba, 0x96, 0xe3, 0x69, 0x9d, 0xe3, 0xf5, 0x1e, 0x8c, 0x1e, 0x16, 0x9a, 0x05, 0xca, + 0x2c, 0xb8, 0xcb, 0xf9, 0x2c, 0x14, 0xca, 0x38, 0xa6, 0x65, 0x16, 0x58, 0x84, 0x5e, 0x0a, 0x85, + 0x46, 0xf0, 0x3f, 0x8d, 0x69, 0x65, 0xae, 0x67, 0x91, 0x88, 0x4b, 0xdf, 0x74, 0xe9, 0xa0, 0x8a, + 0xfe, 0x60, 0x82, 0xe4, 0x21, 0x9c, 0x85, 0x62, 0xc1, 0x51, 0x3b, 0x6d, 0xeb, 0x81, 0xf2, 0x44, + 0x1e, 0x41, 0x3b, 0x14, 0x51, 0x64, 0xcc, 0xd1, 0xa9, 0x12, 0x51, 0x34, 0x0d, 0xc9, 0x8f, 0x70, + 0xc1, 0x72, 0xd4, 0x32, 0x99, 0x29, 0x8e, 0x32, 0x57, 0x8c, 0xa3, 0x03, 0x76, 0x8a, 0x27, 0xf5, + 0x29, 0xae, 0x2d, 0x8a, 0x96, 0x20, 0x7a, 0xce, 0x6a, 0x67, 0x24, 0x1e, 0xb4, 0x91, 0x33, 0xc5, + 0x35, 0x3a, 0x7d, 0x5b, 0xff, 0xa0, 0x5e, 0xff, 0xc6, 0x26, 0x69, 0x05, 0x22, 0xcf, 0xa1, 0x13, + 0x0b, 0xc6, 0x53, 0xe4, 0xe8, 0x0c, 0x8e, 0x49, 0xff, 0xaa, 0xc8, 0x9a, 0xb9, 0xe8, 0x06, 0xea, + 0xfe, 0x01, 0xc3, 0x9b, 0x5c, 0x1b, 0x1f, 0x56, 0xde, 0xdf, 0x19, 0xad, 0x51, 0x1b, 0xed, 0x39, + 0x74, 0xe7, 0xb1, 0x9c, 0x17, 0x7e, 0x6f, 0xd5, 0x9d, 0x55, 0xf9, 0xbd, 0x32, 0x34, 0xed, 0xcc, + 0xcb, 0x27, 0xf7, 0x1a, 0x7a, 0x37, 0xb9, 0xa6, 0x1c, 0x33, 0x99, 0x22, 0x2f, 0x2d, 0xdc, 0xb8, + 0xc7, 0xc2, 0x04, 0x4e, 0xb8, 0xc4, 0xd8, 0xda, 0xbc, 0x43, 0xed, 0xb3, 0xfb, 0x33, 0xbc, 0xff, + 0x5a, 0x20, 0x8a, 0x74, 0x61, 0x6e, 0xc0, 0xff, 0xfd, 0x9e, 0x3e, 0x86, 0x4e, 0xd1, 0x73, 0x68, + 0x5e, 0x1b, 0xb3, 0xe0, 0xb6, 0x6d, 0x2c, 0x44, 0xf7, 0x16, 0x1e, 0xd4, 0x29, 0xcb, 0x06, 0x3f, + 0x85, 0x8b, 0xa4, 0x88, 0xcf, 0x2a, 0x22, 0x4b, 0xdc, 0xa1, 0xe7, 0x65, 0xbc, 0x7a, 0xa9, 0xc9, + 0x64, 0x0b, 0xdd, 0xbb, 0x65, 0x98, 0x6c, 0xa9, 0xcd, 0x65, 0x3e, 0x90, 0x97, 0x3c, 0xe6, 0x9a, + 0xd7, 0xda, 0xdf, 0xed, 0xae, 0x51, 0xeb, 0xee, 0xf2, 0xdf, 0x26, 0x9c, 0x5e, 0x1b, 0x55, 0xc9, + 0xd4, 0xea, 0xb7, 0xb9, 0xd3, 0xdd, 0x97, 0xfc, 0xf0, 0xf3, 0x35, 0x7a, 0x78, 0xf0, 0xc9, 0xfd, + 0xde, 0x7c, 0xfd, 0xc9, 0x15, 0xb4, 0xcb, 0x65, 0x93, 0xa7, 0x47, 0x68, 0x76, 0x5c, 0xf0, 0x56, + 0x8a, 0xdf, 0xa0, 0xbf, 0xab, 0x1a, 0xf9, 0x68, 0x9f, 0xe7, 0xc8, 0x9a, 0x46, 0x1f, 0xdf, 0x0f, + 0x2a, 0x85, 0x9f, 0x42, 0x6f, 0x47, 0xa3, 0xc3, 0x41, 0x0f, 0x05, 0x7c, 0x5b, 0x97, 0x2f, 0xfc, + 0xdf, 0x3f, 0x5b, 0x08, 0xbd, 0xcc, 0xe7, 0xc6, 0x5a, 0x7e, 0x70, 0x97, 0x07, 0xc8, 0x59, 0xae, + 0x84, 0x5e, 0xfb, 0x96, 0xd4, 0xdf, 0xfc, 0x03, 0x7f, 0x6d, 0x7f, 0xe7, 0x67, 0x96, 0xe0, 0x8b, + 0xff, 0x02, 0x00, 0x00, 0xff, 0xff, 0x82, 0x05, 0x5f, 0x23, 0x9b, 0x07, 0x00, 0x00, } diff --git a/rpc/common/service.pb.go b/rpc/common/service.pb.go index a3174db57e58..7183f59f6a24 100644 --- a/rpc/common/service.pb.go +++ b/rpc/common/service.pb.go @@ -77,22 +77,22 @@ func (Severity) EnumDescriptor() ([]byte, []int) { return file_rpc_common_service_proto_rawDescGZIP(), []int{0} } -type DetectedLicense_LicenseCategory int32 +type LicenseCategory_Enum int32 const ( - DetectedLicense_UNSPECIFIED DetectedLicense_LicenseCategory = 0 - DetectedLicense_FORBIDDEN DetectedLicense_LicenseCategory = 1 - DetectedLicense_RESTRICTED DetectedLicense_LicenseCategory = 2 - DetectedLicense_RECIPROCAL DetectedLicense_LicenseCategory = 3 - DetectedLicense_NOTICE DetectedLicense_LicenseCategory = 4 - DetectedLicense_PERMISSIVE DetectedLicense_LicenseCategory = 5 - DetectedLicense_UNENCUMBERED DetectedLicense_LicenseCategory = 6 - DetectedLicense_UNKNOWN DetectedLicense_LicenseCategory = 7 + LicenseCategory_UNSPECIFIED LicenseCategory_Enum = 0 + LicenseCategory_FORBIDDEN LicenseCategory_Enum = 1 + LicenseCategory_RESTRICTED LicenseCategory_Enum = 2 + LicenseCategory_RECIPROCAL LicenseCategory_Enum = 3 + LicenseCategory_NOTICE LicenseCategory_Enum = 4 + LicenseCategory_PERMISSIVE LicenseCategory_Enum = 5 + LicenseCategory_UNENCUMBERED LicenseCategory_Enum = 6 + LicenseCategory_UNKNOWN LicenseCategory_Enum = 7 ) -// Enum value maps for DetectedLicense_LicenseCategory. +// Enum value maps for LicenseCategory_Enum. var ( - DetectedLicense_LicenseCategory_name = map[int32]string{ + LicenseCategory_Enum_name = map[int32]string{ 0: "UNSPECIFIED", 1: "FORBIDDEN", 2: "RESTRICTED", @@ -102,7 +102,7 @@ var ( 6: "UNENCUMBERED", 7: "UNKNOWN", } - DetectedLicense_LicenseCategory_value = map[string]int32{ + LicenseCategory_Enum_value = map[string]int32{ "UNSPECIFIED": 0, "FORBIDDEN": 1, "RESTRICTED": 2, @@ -114,31 +114,83 @@ var ( } ) -func (x DetectedLicense_LicenseCategory) Enum() *DetectedLicense_LicenseCategory { - p := new(DetectedLicense_LicenseCategory) +func (x LicenseCategory_Enum) Enum() *LicenseCategory_Enum { + p := new(LicenseCategory_Enum) *p = x return p } -func (x DetectedLicense_LicenseCategory) String() string { +func (x LicenseCategory_Enum) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (DetectedLicense_LicenseCategory) Descriptor() protoreflect.EnumDescriptor { +func (LicenseCategory_Enum) Descriptor() protoreflect.EnumDescriptor { return file_rpc_common_service_proto_enumTypes[1].Descriptor() } -func (DetectedLicense_LicenseCategory) Type() protoreflect.EnumType { +func (LicenseCategory_Enum) Type() protoreflect.EnumType { return &file_rpc_common_service_proto_enumTypes[1] } -func (x DetectedLicense_LicenseCategory) Number() protoreflect.EnumNumber { +func (x LicenseCategory_Enum) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use DetectedLicense_LicenseCategory.Descriptor instead. -func (DetectedLicense_LicenseCategory) EnumDescriptor() ([]byte, []int) { - return file_rpc_common_service_proto_rawDescGZIP(), []int{19, 0} +// Deprecated: Use LicenseCategory_Enum.Descriptor instead. +func (LicenseCategory_Enum) EnumDescriptor() ([]byte, []int) { + return file_rpc_common_service_proto_rawDescGZIP(), []int{22, 0} +} + +type LicenseType_Enum int32 + +const ( + LicenseType_UNSPECIFIED LicenseType_Enum = 0 + LicenseType_DPKG LicenseType_Enum = 1 + LicenseType_HEADER LicenseType_Enum = 2 + LicenseType_LICENSE_FILE LicenseType_Enum = 3 +) + +// Enum value maps for LicenseType_Enum. +var ( + LicenseType_Enum_name = map[int32]string{ + 0: "UNSPECIFIED", + 1: "DPKG", + 2: "HEADER", + 3: "LICENSE_FILE", + } + LicenseType_Enum_value = map[string]int32{ + "UNSPECIFIED": 0, + "DPKG": 1, + "HEADER": 2, + "LICENSE_FILE": 3, + } +) + +func (x LicenseType_Enum) Enum() *LicenseType_Enum { + p := new(LicenseType_Enum) + *p = x + return p +} + +func (x LicenseType_Enum) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (LicenseType_Enum) Descriptor() protoreflect.EnumDescriptor { + return file_rpc_common_service_proto_enumTypes[2].Descriptor() +} + +func (LicenseType_Enum) Type() protoreflect.EnumType { + return &file_rpc_common_service_proto_enumTypes[2] +} + +func (x LicenseType_Enum) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use LicenseType_Enum.Descriptor instead. +func (LicenseType_Enum) EnumDescriptor() ([]byte, []int) { + return file_rpc_common_service_proto_rawDescGZIP(), []int{23, 0} } type OS struct { @@ -1883,13 +1935,13 @@ type DetectedLicense struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=trivy.common.Severity" json:"severity,omitempty"` - Category DetectedLicense_LicenseCategory `protobuf:"varint,2,opt,name=category,proto3,enum=trivy.common.DetectedLicense_LicenseCategory" json:"category,omitempty"` - PkgName string `protobuf:"bytes,3,opt,name=pkg_name,json=pkgName,proto3" json:"pkg_name,omitempty"` - FilePath string `protobuf:"bytes,4,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` - Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` - Confidence float32 `protobuf:"fixed32,6,opt,name=confidence,proto3" json:"confidence,omitempty"` - Link string `protobuf:"bytes,7,opt,name=link,proto3" json:"link,omitempty"` + Severity Severity `protobuf:"varint,1,opt,name=severity,proto3,enum=trivy.common.Severity" json:"severity,omitempty"` + Category LicenseCategory_Enum `protobuf:"varint,2,opt,name=category,proto3,enum=trivy.common.LicenseCategory_Enum" json:"category,omitempty"` + PkgName string `protobuf:"bytes,3,opt,name=pkg_name,json=pkgName,proto3" json:"pkg_name,omitempty"` + FilePath string `protobuf:"bytes,4,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + Confidence float32 `protobuf:"fixed32,6,opt,name=confidence,proto3" json:"confidence,omitempty"` + Link string `protobuf:"bytes,7,opt,name=link,proto3" json:"link,omitempty"` } func (x *DetectedLicense) Reset() { @@ -1931,11 +1983,11 @@ func (x *DetectedLicense) GetSeverity() Severity { return Severity_UNKNOWN } -func (x *DetectedLicense) GetCategory() DetectedLicense_LicenseCategory { +func (x *DetectedLicense) GetCategory() LicenseCategory_Enum { if x != nil { return x.Category } - return DetectedLicense_UNSPECIFIED + return LicenseCategory_UNSPECIFIED } func (x *DetectedLicense) GetPkgName() string { @@ -1973,6 +2025,235 @@ func (x *DetectedLicense) GetLink() string { return "" } +type LicenseFile struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + LicenseType LicenseType_Enum `protobuf:"varint,1,opt,name=license_type,json=licenseType,proto3,enum=trivy.common.LicenseType_Enum" json:"license_type,omitempty"` + FilePath string `protobuf:"bytes,2,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` + PkgName string `protobuf:"bytes,3,opt,name=pkg_name,json=pkgName,proto3" json:"pkg_name,omitempty"` + Fingings []*LicenseFinding `protobuf:"bytes,4,rep,name=fingings,proto3" json:"fingings,omitempty"` + Layer *Layer `protobuf:"bytes,5,opt,name=layer,proto3" json:"layer,omitempty"` +} + +func (x *LicenseFile) Reset() { + *x = LicenseFile{} + if protoimpl.UnsafeEnabled { + mi := &file_rpc_common_service_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LicenseFile) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LicenseFile) ProtoMessage() {} + +func (x *LicenseFile) ProtoReflect() protoreflect.Message { + mi := &file_rpc_common_service_proto_msgTypes[20] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LicenseFile.ProtoReflect.Descriptor instead. +func (*LicenseFile) Descriptor() ([]byte, []int) { + return file_rpc_common_service_proto_rawDescGZIP(), []int{20} +} + +func (x *LicenseFile) GetLicenseType() LicenseType_Enum { + if x != nil { + return x.LicenseType + } + return LicenseType_UNSPECIFIED +} + +func (x *LicenseFile) GetFilePath() string { + if x != nil { + return x.FilePath + } + return "" +} + +func (x *LicenseFile) GetPkgName() string { + if x != nil { + return x.PkgName + } + return "" +} + +func (x *LicenseFile) GetFingings() []*LicenseFinding { + if x != nil { + return x.Fingings + } + return nil +} + +func (x *LicenseFile) GetLayer() *Layer { + if x != nil { + return x.Layer + } + return nil +} + +type LicenseFinding struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Category LicenseCategory_Enum `protobuf:"varint,1,opt,name=category,proto3,enum=trivy.common.LicenseCategory_Enum" json:"category,omitempty"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` + Confidence float32 `protobuf:"fixed32,3,opt,name=confidence,proto3" json:"confidence,omitempty"` + Link string `protobuf:"bytes,4,opt,name=link,proto3" json:"link,omitempty"` +} + +func (x *LicenseFinding) Reset() { + *x = LicenseFinding{} + if protoimpl.UnsafeEnabled { + mi := &file_rpc_common_service_proto_msgTypes[21] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LicenseFinding) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LicenseFinding) ProtoMessage() {} + +func (x *LicenseFinding) ProtoReflect() protoreflect.Message { + mi := &file_rpc_common_service_proto_msgTypes[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LicenseFinding.ProtoReflect.Descriptor instead. +func (*LicenseFinding) Descriptor() ([]byte, []int) { + return file_rpc_common_service_proto_rawDescGZIP(), []int{21} +} + +func (x *LicenseFinding) GetCategory() LicenseCategory_Enum { + if x != nil { + return x.Category + } + return LicenseCategory_UNSPECIFIED +} + +func (x *LicenseFinding) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *LicenseFinding) GetConfidence() float32 { + if x != nil { + return x.Confidence + } + return 0 +} + +func (x *LicenseFinding) GetLink() string { + if x != nil { + return x.Link + } + return "" +} + +// Enumerations are wrapped with a message to improve the readability of enumerations +// in generated code and avoid name conflicts. +// https://github.com/golang/protobuf/issues/513 +type LicenseCategory struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LicenseCategory) Reset() { + *x = LicenseCategory{} + if protoimpl.UnsafeEnabled { + mi := &file_rpc_common_service_proto_msgTypes[22] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LicenseCategory) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LicenseCategory) ProtoMessage() {} + +func (x *LicenseCategory) ProtoReflect() protoreflect.Message { + mi := &file_rpc_common_service_proto_msgTypes[22] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LicenseCategory.ProtoReflect.Descriptor instead. +func (*LicenseCategory) Descriptor() ([]byte, []int) { + return file_rpc_common_service_proto_rawDescGZIP(), []int{22} +} + +type LicenseType struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *LicenseType) Reset() { + *x = LicenseType{} + if protoimpl.UnsafeEnabled { + mi := &file_rpc_common_service_proto_msgTypes[23] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LicenseType) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LicenseType) ProtoMessage() {} + +func (x *LicenseType) ProtoReflect() protoreflect.Message { + mi := &file_rpc_common_service_proto_msgTypes[23] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use LicenseType.ProtoReflect.Descriptor instead. +func (*LicenseType) Descriptor() ([]byte, []int) { + return file_rpc_common_service_proto_rawDescGZIP(), []int{23} +} + var File_rpc_common_service_proto protoreflect.FileDescriptor var file_rpc_common_service_proto_rawDesc = []byte{ @@ -2274,41 +2555,71 @@ var file_rpc_common_service_proto_rawDesc = []byte{ 0x0a, 0x08, 0x66, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x46, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x66, - 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x9f, 0x03, 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x65, + 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x0f, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x52, 0x08, 0x73, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x49, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x2d, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, + 0x3e, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, - 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x70, 0x6b, - 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x6b, - 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, - 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, + 0x19, 0x0a, 0x08, 0x70, 0x6b, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, + 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, + 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, + 0x69, 0x6e, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, + 0xed, 0x01, 0x0a, 0x0b, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, + 0x41, 0x0a, 0x0c, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1e, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x0b, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x19, 0x0a, 0x08, 0x70, 0x6b, 0x67, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x70, 0x6b, 0x67, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x08, 0x66, 0x69, + 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, + 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x63, 0x65, + 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x66, 0x69, 0x6e, 0x67, + 0x69, 0x6e, 0x67, 0x73, 0x12, 0x29, 0x0a, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, + 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x79, 0x65, 0x72, 0x52, 0x05, 0x6c, 0x61, 0x79, 0x65, 0x72, 0x22, + 0x98, 0x01, 0x0a, 0x0e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x46, 0x69, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x12, 0x3e, 0x0a, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x22, 0x2e, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2e, 0x63, 0x6f, 0x6d, + 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, + 0x6f, 0x72, 0x79, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, + 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x64, - 0x65, 0x6e, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x07, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x8c, 0x01, 0x0a, 0x0f, 0x4c, - 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x0f, - 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x46, 0x4f, 0x52, 0x42, 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, - 0x0a, 0x0a, 0x52, 0x45, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, - 0x0a, 0x0a, 0x52, 0x45, 0x43, 0x49, 0x50, 0x52, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0a, - 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x43, 0x45, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x45, - 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x56, 0x45, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, - 0x45, 0x4e, 0x43, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x07, 0x2a, 0x44, 0x0a, 0x08, 0x53, 0x65, 0x76, - 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4c, 0x4f, 0x57, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, - 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, - 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x04, 0x42, - 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x71, - 0x75, 0x61, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x69, 0x76, 0x79, - 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, - 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x64, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x22, 0x95, 0x01, 0x0a, 0x0f, 0x4c, + 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x22, 0x81, + 0x01, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, + 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x46, 0x4f, 0x52, 0x42, + 0x49, 0x44, 0x44, 0x45, 0x4e, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x53, 0x54, 0x52, + 0x49, 0x43, 0x54, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x52, 0x45, 0x43, 0x49, 0x50, + 0x52, 0x4f, 0x43, 0x41, 0x4c, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x4e, 0x4f, 0x54, 0x49, 0x43, + 0x45, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x56, + 0x45, 0x10, 0x05, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x4e, 0x45, 0x4e, 0x43, 0x55, 0x4d, 0x42, 0x45, + 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x07, 0x22, 0x4e, 0x0a, 0x0b, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x54, 0x79, 0x70, + 0x65, 0x22, 0x3f, 0x0a, 0x04, 0x45, 0x6e, 0x75, 0x6d, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x44, 0x50, + 0x4b, 0x47, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x48, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x02, + 0x12, 0x10, 0x0a, 0x0c, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x5f, 0x46, 0x49, 0x4c, 0x45, + 0x10, 0x03, 0x2a, 0x44, 0x0a, 0x08, 0x53, 0x65, 0x76, 0x65, 0x72, 0x69, 0x74, 0x79, 0x12, 0x0b, + 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x4c, + 0x4f, 0x57, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x45, 0x44, 0x49, 0x55, 0x4d, 0x10, 0x02, + 0x12, 0x08, 0x0a, 0x04, 0x48, 0x49, 0x47, 0x48, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x52, + 0x49, 0x54, 0x49, 0x43, 0x41, 0x4c, 0x10, 0x04, 0x42, 0x31, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x71, 0x75, 0x61, 0x73, 0x65, 0x63, 0x75, 0x72, + 0x69, 0x74, 0x79, 0x2f, 0x74, 0x72, 0x69, 0x76, 0x79, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, + 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( @@ -2323,74 +2634,83 @@ func file_rpc_common_service_proto_rawDescGZIP() []byte { return file_rpc_common_service_proto_rawDescData } -var file_rpc_common_service_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_rpc_common_service_proto_msgTypes = make([]protoimpl.MessageInfo, 22) +var file_rpc_common_service_proto_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_rpc_common_service_proto_msgTypes = make([]protoimpl.MessageInfo, 26) var file_rpc_common_service_proto_goTypes = []interface{}{ - (Severity)(0), // 0: trivy.common.Severity - (DetectedLicense_LicenseCategory)(0), // 1: trivy.common.DetectedLicense.LicenseCategory - (*OS)(nil), // 2: trivy.common.OS - (*Repository)(nil), // 3: trivy.common.Repository - (*PackageInfo)(nil), // 4: trivy.common.PackageInfo - (*Application)(nil), // 5: trivy.common.Application - (*Package)(nil), // 6: trivy.common.Package - (*Misconfiguration)(nil), // 7: trivy.common.Misconfiguration - (*MisconfResult)(nil), // 8: trivy.common.MisconfResult - (*PolicyMetadata)(nil), // 9: trivy.common.PolicyMetadata - (*DetectedMisconfiguration)(nil), // 10: trivy.common.DetectedMisconfiguration - (*Vulnerability)(nil), // 11: trivy.common.Vulnerability - (*DataSource)(nil), // 12: trivy.common.DataSource - (*Layer)(nil), // 13: trivy.common.Layer - (*CauseMetadata)(nil), // 14: trivy.common.CauseMetadata - (*CVSS)(nil), // 15: trivy.common.CVSS - (*CustomResource)(nil), // 16: trivy.common.CustomResource - (*Line)(nil), // 17: trivy.common.Line - (*Code)(nil), // 18: trivy.common.Code - (*SecretFinding)(nil), // 19: trivy.common.SecretFinding - (*Secret)(nil), // 20: trivy.common.Secret - (*DetectedLicense)(nil), // 21: trivy.common.DetectedLicense - nil, // 22: trivy.common.Vulnerability.CvssEntry - nil, // 23: trivy.common.Vulnerability.VendorSeverityEntry - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*structpb.Value)(nil), // 25: google.protobuf.Value + (Severity)(0), // 0: trivy.common.Severity + (LicenseCategory_Enum)(0), // 1: trivy.common.LicenseCategory.Enum + (LicenseType_Enum)(0), // 2: trivy.common.LicenseType.Enum + (*OS)(nil), // 3: trivy.common.OS + (*Repository)(nil), // 4: trivy.common.Repository + (*PackageInfo)(nil), // 5: trivy.common.PackageInfo + (*Application)(nil), // 6: trivy.common.Application + (*Package)(nil), // 7: trivy.common.Package + (*Misconfiguration)(nil), // 8: trivy.common.Misconfiguration + (*MisconfResult)(nil), // 9: trivy.common.MisconfResult + (*PolicyMetadata)(nil), // 10: trivy.common.PolicyMetadata + (*DetectedMisconfiguration)(nil), // 11: trivy.common.DetectedMisconfiguration + (*Vulnerability)(nil), // 12: trivy.common.Vulnerability + (*DataSource)(nil), // 13: trivy.common.DataSource + (*Layer)(nil), // 14: trivy.common.Layer + (*CauseMetadata)(nil), // 15: trivy.common.CauseMetadata + (*CVSS)(nil), // 16: trivy.common.CVSS + (*CustomResource)(nil), // 17: trivy.common.CustomResource + (*Line)(nil), // 18: trivy.common.Line + (*Code)(nil), // 19: trivy.common.Code + (*SecretFinding)(nil), // 20: trivy.common.SecretFinding + (*Secret)(nil), // 21: trivy.common.Secret + (*DetectedLicense)(nil), // 22: trivy.common.DetectedLicense + (*LicenseFile)(nil), // 23: trivy.common.LicenseFile + (*LicenseFinding)(nil), // 24: trivy.common.LicenseFinding + (*LicenseCategory)(nil), // 25: trivy.common.LicenseCategory + (*LicenseType)(nil), // 26: trivy.common.LicenseType + nil, // 27: trivy.common.Vulnerability.CvssEntry + nil, // 28: trivy.common.Vulnerability.VendorSeverityEntry + (*timestamppb.Timestamp)(nil), // 29: google.protobuf.Timestamp + (*structpb.Value)(nil), // 30: google.protobuf.Value } var file_rpc_common_service_proto_depIdxs = []int32{ - 6, // 0: trivy.common.PackageInfo.packages:type_name -> trivy.common.Package - 6, // 1: trivy.common.Application.libraries:type_name -> trivy.common.Package - 13, // 2: trivy.common.Package.layer:type_name -> trivy.common.Layer - 8, // 3: trivy.common.Misconfiguration.successes:type_name -> trivy.common.MisconfResult - 8, // 4: trivy.common.Misconfiguration.warnings:type_name -> trivy.common.MisconfResult - 8, // 5: trivy.common.Misconfiguration.failures:type_name -> trivy.common.MisconfResult - 8, // 6: trivy.common.Misconfiguration.exceptions:type_name -> trivy.common.MisconfResult - 9, // 7: trivy.common.MisconfResult.policy_metadata:type_name -> trivy.common.PolicyMetadata - 14, // 8: trivy.common.MisconfResult.cause_metadata:type_name -> trivy.common.CauseMetadata + 7, // 0: trivy.common.PackageInfo.packages:type_name -> trivy.common.Package + 7, // 1: trivy.common.Application.libraries:type_name -> trivy.common.Package + 14, // 2: trivy.common.Package.layer:type_name -> trivy.common.Layer + 9, // 3: trivy.common.Misconfiguration.successes:type_name -> trivy.common.MisconfResult + 9, // 4: trivy.common.Misconfiguration.warnings:type_name -> trivy.common.MisconfResult + 9, // 5: trivy.common.Misconfiguration.failures:type_name -> trivy.common.MisconfResult + 9, // 6: trivy.common.Misconfiguration.exceptions:type_name -> trivy.common.MisconfResult + 10, // 7: trivy.common.MisconfResult.policy_metadata:type_name -> trivy.common.PolicyMetadata + 15, // 8: trivy.common.MisconfResult.cause_metadata:type_name -> trivy.common.CauseMetadata 0, // 9: trivy.common.DetectedMisconfiguration.severity:type_name -> trivy.common.Severity - 13, // 10: trivy.common.DetectedMisconfiguration.layer:type_name -> trivy.common.Layer - 14, // 11: trivy.common.DetectedMisconfiguration.cause_metadata:type_name -> trivy.common.CauseMetadata + 14, // 10: trivy.common.DetectedMisconfiguration.layer:type_name -> trivy.common.Layer + 15, // 11: trivy.common.DetectedMisconfiguration.cause_metadata:type_name -> trivy.common.CauseMetadata 0, // 12: trivy.common.Vulnerability.severity:type_name -> trivy.common.Severity - 13, // 13: trivy.common.Vulnerability.layer:type_name -> trivy.common.Layer - 22, // 14: trivy.common.Vulnerability.cvss:type_name -> trivy.common.Vulnerability.CvssEntry - 24, // 15: trivy.common.Vulnerability.published_date:type_name -> google.protobuf.Timestamp - 24, // 16: trivy.common.Vulnerability.last_modified_date:type_name -> google.protobuf.Timestamp - 25, // 17: trivy.common.Vulnerability.custom_advisory_data:type_name -> google.protobuf.Value - 25, // 18: trivy.common.Vulnerability.custom_vuln_data:type_name -> google.protobuf.Value - 12, // 19: trivy.common.Vulnerability.data_source:type_name -> trivy.common.DataSource - 23, // 20: trivy.common.Vulnerability.vendor_severity:type_name -> trivy.common.Vulnerability.VendorSeverityEntry - 18, // 21: trivy.common.CauseMetadata.code:type_name -> trivy.common.Code - 13, // 22: trivy.common.CustomResource.layer:type_name -> trivy.common.Layer - 25, // 23: trivy.common.CustomResource.data:type_name -> google.protobuf.Value - 17, // 24: trivy.common.Code.lines:type_name -> trivy.common.Line - 18, // 25: trivy.common.SecretFinding.code:type_name -> trivy.common.Code - 13, // 26: trivy.common.SecretFinding.layer:type_name -> trivy.common.Layer - 19, // 27: trivy.common.Secret.findings:type_name -> trivy.common.SecretFinding + 14, // 13: trivy.common.Vulnerability.layer:type_name -> trivy.common.Layer + 27, // 14: trivy.common.Vulnerability.cvss:type_name -> trivy.common.Vulnerability.CvssEntry + 29, // 15: trivy.common.Vulnerability.published_date:type_name -> google.protobuf.Timestamp + 29, // 16: trivy.common.Vulnerability.last_modified_date:type_name -> google.protobuf.Timestamp + 30, // 17: trivy.common.Vulnerability.custom_advisory_data:type_name -> google.protobuf.Value + 30, // 18: trivy.common.Vulnerability.custom_vuln_data:type_name -> google.protobuf.Value + 13, // 19: trivy.common.Vulnerability.data_source:type_name -> trivy.common.DataSource + 28, // 20: trivy.common.Vulnerability.vendor_severity:type_name -> trivy.common.Vulnerability.VendorSeverityEntry + 19, // 21: trivy.common.CauseMetadata.code:type_name -> trivy.common.Code + 14, // 22: trivy.common.CustomResource.layer:type_name -> trivy.common.Layer + 30, // 23: trivy.common.CustomResource.data:type_name -> google.protobuf.Value + 18, // 24: trivy.common.Code.lines:type_name -> trivy.common.Line + 19, // 25: trivy.common.SecretFinding.code:type_name -> trivy.common.Code + 14, // 26: trivy.common.SecretFinding.layer:type_name -> trivy.common.Layer + 20, // 27: trivy.common.Secret.findings:type_name -> trivy.common.SecretFinding 0, // 28: trivy.common.DetectedLicense.severity:type_name -> trivy.common.Severity - 1, // 29: trivy.common.DetectedLicense.category:type_name -> trivy.common.DetectedLicense.LicenseCategory - 15, // 30: trivy.common.Vulnerability.CvssEntry.value:type_name -> trivy.common.CVSS - 0, // 31: trivy.common.Vulnerability.VendorSeverityEntry.value:type_name -> trivy.common.Severity - 32, // [32:32] is the sub-list for method output_type - 32, // [32:32] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name + 1, // 29: trivy.common.DetectedLicense.category:type_name -> trivy.common.LicenseCategory.Enum + 2, // 30: trivy.common.LicenseFile.license_type:type_name -> trivy.common.LicenseType.Enum + 24, // 31: trivy.common.LicenseFile.fingings:type_name -> trivy.common.LicenseFinding + 14, // 32: trivy.common.LicenseFile.layer:type_name -> trivy.common.Layer + 1, // 33: trivy.common.LicenseFinding.category:type_name -> trivy.common.LicenseCategory.Enum + 16, // 34: trivy.common.Vulnerability.CvssEntry.value:type_name -> trivy.common.CVSS + 0, // 35: trivy.common.Vulnerability.VendorSeverityEntry.value:type_name -> trivy.common.Severity + 36, // [36:36] is the sub-list for method output_type + 36, // [36:36] is the sub-list for method input_type + 36, // [36:36] is the sub-list for extension type_name + 36, // [36:36] is the sub-list for extension extendee + 0, // [0:36] is the sub-list for field type_name } func init() { file_rpc_common_service_proto_init() } @@ -2639,14 +2959,62 @@ func file_rpc_common_service_proto_init() { return nil } } + file_rpc_common_service_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LicenseFile); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rpc_common_service_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LicenseFinding); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rpc_common_service_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LicenseCategory); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_rpc_common_service_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LicenseType); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_rpc_common_service_proto_rawDesc, - NumEnums: 2, - NumMessages: 22, + NumEnums: 3, + NumMessages: 26, NumExtensions: 0, NumServices: 0, }, diff --git a/rpc/common/service.proto b/rpc/common/service.proto index b28e7ff32959..ee8aaea697d3 100644 --- a/rpc/common/service.proto +++ b/rpc/common/service.proto @@ -205,15 +205,35 @@ message Secret { } message DetectedLicense { - Severity severity = 1; - LicenseCategory category = 2; - string pkg_name = 3; - string file_path = 4; - string name = 5; - float confidence = 6; - string link = 7; - - enum LicenseCategory { + Severity severity = 1; + LicenseCategory.Enum category = 2; + string pkg_name = 3; + string file_path = 4; + string name = 5; + float confidence = 6; + string link = 7; +} + +message LicenseFile { + LicenseType.Enum license_type = 1; + string file_path = 2; + string pkg_name = 3; + repeated LicenseFinding fingings = 4; + Layer layer = 5; +} + +message LicenseFinding { + LicenseCategory.Enum category = 1; + string name = 2; + float confidence = 3; + string link = 4; +} + +// Enumerations are wrapped with a message to improve the readability of enumerations +// in generated code and avoid name conflicts. +// https://github.com/golang/protobuf/issues/513 +message LicenseCategory { + enum Enum { UNSPECIFIED = 0; FORBIDDEN = 1; RESTRICTED = 2; @@ -224,3 +244,12 @@ message DetectedLicense { UNKNOWN = 7; } } + +message LicenseType { + enum Enum { + UNSPECIFIED = 0; + DPKG = 1; + HEADER = 2; + LICENSE_FILE = 3; + } +} \ No newline at end of file