From patchwork Fri Dec 4 18:30:08 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Esa Jaaskela X-Patchwork-Id: 107423 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.3683.1796409022036267710 for ; Fri, 04 Dec 2026 10:30:22 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="dkim: body hash did not verify" header.i=@suomi24.fi header.s=MBO0001 header.b=ix3Tyu0x; spf=pass (domain: suomi24.fi, ip: 80.241.56.152, mailfrom: esa.jaaskela@suomi24.fi) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519MLKEM768 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4jh0RH2gxgzKm48; Fri, 04 Dec 2026 19:30:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suomi24.fi; s=MBO0001; t=1796409019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=gf2j80/kpn4i/CHZhnMCg+I1hXoBYzCkWwFp+bKKsgE=; b=ix3Tyu0xFNDkXNp2WqvF27AegjsNuuodGJ2XzO/zd4u238bUEXiaxhPU02Q//jmEXgPTnd wN58MSckZJsp0z0Sl7Ot+n1VfCqJeRBpKz0L0BW/lVu/T0CJ8UBFIuaDxaOmufZaoXsE7e HkHYI878bQpmz2vlznSloEXIoev28lC+bE3Eoo/wZefBGE8XrrRG352JtoPscuBtC+1Sik Rs17UHS5C6t9sMigb4WMR7vx/K8C+sw/S0E3i2rcL/XPLkMibjkQwfNgKNnvJ488BgKMDd hUqmFMocypiYM6S3WL6beLJqYRwiLpIExphhp1gngp7pzp8/SnL5sQyWV6b9/w== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of esa.jaaskela@suomi24.fi designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=esa.jaaskela@suomi24.fi From: Esa Jaaskela To: openembedded-core@lists.openembedded.org Cc: Esa Jaaskela Subject: [PATCH] sbom-cve-check: Read the SBOM through IMAGE_LINK_NAME if it is set Date: Fri, 4 Dec 2026 20:30:08 +0200 Message-ID: <20261204183008.1948784-1-esa.jaaskela@suomi24.fi> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4jh0RH2gxgzKm48 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by lin-tor-korg-lkml-alma10-1 with HTTPS for ; Fri, 04 Dec 2026 18:30:24 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/252090 If the image content stays constant and only the CVE databases change, which the AUTOREV in the sbom-cve-check fragment makes common, the do_sbom_cve_check task runs again in a new build while do_create_image_sbom_spdx task is not re-run. This in turn results in a failure, as an SBOM with the full IMAGE_NAME containing the timestamp cannot be found. Read the SBOM through the ${IMAGE_LINK_NAME}.spdx.json link if it is set. It points to the SBOM of the latest do_create_image_sbom_spdx run. Fall back to ${IMAGE_NAME}.spdx.json if IMAGE_LINK_NAME is empty. Signed-off-by: Esa Jaaskela --- meta/classes-recipe/sbom-cve-check.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes-recipe/sbom-cve-check.bbclass b/meta/classes-recipe/sbom-cve-check.bbclass index 451595f1d7..3a9fb39df6 100644 --- a/meta/classes-recipe/sbom-cve-check.bbclass +++ b/meta/classes-recipe/sbom-cve-check.bbclass @@ -14,9 +14,9 @@ python do_sbom_cve_check() { """ Task: Run sbom-cve-check analysis on SBOM. """ - sbom_path = d.expand("${DEPLOY_DIR_IMAGE}/${IMAGE_NAME}.spdx.json") image_name = d.getVar("IMAGE_NAME") link_name = d.getVar("IMAGE_LINK_NAME") + sbom_path = d.expand("${DEPLOY_DIR_IMAGE}/%s.spdx.json" % (link_name or image_name)) run_sbom_cve_check(d, sbom_path, image_name, link_name) }