SBOM_CVE_CHECK_DEPLOYDIR = "${WORKDIR}/sbom-cve-check/image-deploy"
+SBOM_CVE_CHECK_SCAN_SCOPE ?= "target"
+SBOM_CVE_CHECK_SCAN_SCOPE[doc] = "Whether to scan target and native, just target, or just native. \
+ Valid values are both, target, native."
+
SBOM_CVE_CHECK_EXTRA_ARGS[doc] = "Allow to specify extra arguments to sbom-cve-check. \
For example to add export flags for filtering (e.g., only export vulnerable CVEs). \
"
dl_db_dir = d.getVar("SBOM_CVE_CHECK_DEPLOY_DB_DIR")
out_deploy_dir = d.getVar("SBOM_CVE_CHECK_DEPLOYDIR")
+ scan_scope = d.getVar("SBOM_CVE_CHECK_SCAN_SCOPE")
export_files = []
for export_var in d.getVar("SBOM_CVE_CHECK_EXPORT_VARS").split():
d.expand("${STAGING_BINDIR_NATIVE}/sbom-cve-check"),
"--sbom-path",
sbom_path,
- "--disable-auto-updates"
+ "--disable-auto-updates",
+ "--export-process-native",
+ scan_scope,
]
for export_type, export_file, export_link in export_files:
inherit sbom-cve-check-common
+# Recipe-based scanning should cover both target and native components.
+SBOM_CVE_CHECK_SCAN_SCOPE = "both"
+
python do_sbom_cve_check_recipe() {
"""
Task: Run sbom-cve-check analysis on a recipe SBOM.