aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2023-10-24 08:27:13 +0000
committerPetr Štetiar <ynezz@true.cz>2023-11-02 14:44:47 +0000
commit21e5db97c410f4008c8fe8515fb79a7cde368dbf (patch)
tree9b913ed60059392917ef2f5221b8eec13c482e89 /include
parent4ef8899c7ab6ac9c69f7cc7138c3fc8a3fec777b (diff)
downloadupstream-21e5db97c410f4008c8fe8515fb79a7cde368dbf.tar.gz
upstream-21e5db97c410f4008c8fe8515fb79a7cde368dbf.tar.bz2
upstream-21e5db97c410f4008c8fe8515fb79a7cde368dbf.zip
build: add CycloneDX SBOM JSON support
CycloneDX is an open source standard developed by the OWASP foundation. It supports a wide range of development ecosystems, a comprehensive set of use cases, and focuses on automation, ease of adoption, and progressive enhancement of SBOMs (Software Bill Of Materials) throughout build pipelines. So lets add support for CycloneDX SBOM for packages and images manifests. Signed-off-by: Petr Štetiar <ynezz@true.cz> (cherry picked from commit d604a07225c5c82b942cd3374cc113ad676a2519)
Diffstat (limited to 'include')
-rw-r--r--include/image.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/image.mk b/include/image.mk
index fae4d32a8b..3d5d6c1613 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -277,6 +277,11 @@ endef
define Image/Manifest
$(call opkg,$(TARGET_DIR_ORIG)) list-installed > \
$(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest
+ $(if $(CONFIG_JSON_CYCLONEDX_SBOM), \
+ $(SCRIPT_DIR)/package-metadata.pl imgcyclonedxsbom \
+ $(TMP_DIR)/.packageinfo \
+ $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).manifest > \
+ $(BIN_DIR)/$(IMG_PREFIX)$(if $(PROFILE_SANITIZED),-$(PROFILE_SANITIZED)).bom.cdx.json)
endef
define Image/gzip-ext4-padded-squashfs