src/sbom: push for further CRA compliance - #938
Conversation
|
Got down to 0 errors for CRA compliance. λ diff cra-validate.log cra-validate_afterfixes.log
flewinski in ~/workspace/sbom-iter2/coreboot on sbom_iter2 ● λ cd ..
flewinski in ~/workspace/sbom-iter2 λ diff cra-validate.log cra-validate_afterfixes.log
1,2c1,2
< 2026-07-10T07:46:05.786632Z INFO Parsing SBOM: "artifacts/novacustom/nuc_box_mtl/coreboot/uefi/v0.9.2-rc4/novacustom_nuc_box_mtl_v0.
< 2026-07-10T07:46:05.787097Z INFO Parsed 8 components
---
> 2026-07-10T10:51:07.640691Z INFO Parsing SBOM: "novacustom_nuc_box_v0.9.2-rc4.sbom.json"
> 2026-07-10T10:51:07.641108Z INFO Parsed 8 components
4c4
< Status: NON-COMPLIANT (1 errors, 5 warnings, 16 info)
---
> Status: COMPLIANT (0 errors, 5 warnings, 11 info)
20,29d19
< [INFO] Integrity Information | CRA Annex I: Component integrity information (hash) | Intel Management Engine
< [CRA Annex I] Component 'Intel Management Engine' missing cryptographic hash (recommended for integrity)
< [INFO] Integrity Information | CRA Annex I: Component integrity information (hash) | edk2
< [CRA Annex I] Component 'edk2' missing cryptographic hash (recommended for integrity)
< [INFO] Integrity Information | CRA Annex I: Component integrity information (hash) | Intel-Microcode
< [CRA Annex I] Component 'Intel-Microcode' missing cryptographic hash (recommended for integrity)
< [INFO] Integrity Information | CRA Annex I: Component integrity information (hash) | Intel Firmware Support Package
< [CRA Annex I] Component 'Intel Firmware Support Package' missing cryptographic hash (recommended for integrity)
< [INFO] Integrity Information | CRA Annex I: Component integrity information (hash) | Intel Flash Descriptor
< [CRA Annex I] Component 'Intel Flash Descriptor' missing cryptographic hash (recommended for integrity)
34,35d23
< [WARN] License Information | CRA Art. 13(5): Licensed component tracking | -
< [CRA Art. 13(5)] 7/8 components (87%) missing license information
38,39c26,27
< [ERROR] Integrity Information | CRA Annex I Part II / prEN 40000-1-3 [PRE-7-RQ-07-RE]: Vendor hash carry-through | -
< [CRA Annex I, Part II / [PRE-7-RQ-07-RE]] Only 0/8 vendor-supplied components (0%) carry an upstream hash — below 50% threshold
---
> [WARN] Integrity Information | CRA Annex I Part II / prEN 40000-1-3 [PRE-7-RQ-07-RE]: Vendor hash carry-through | -
> [CRA Annex I, Part II / [PRE-7-RQ-07-RE]] Only 5/8 vendor-supplied components (63%) carry an upstream hash — below 80% threshold |
c1b350d to
e21a23b
Compare
|
LVFS does not detect the SBOM in the binary built from this branch. Uploaded to embargo. I'm still getting no hash for FSP-S. I've built the firmware for nv41mz with this diff: git diff
diff --git a/configs/config.novacustom_nv4x_tgl b/configs/config.novacustom_nv4x_tgl
index 327a07357d92..10230b3bfaf9 100644
--- a/configs/config.novacustom_nv4x_tgl
+++ b/configs/config.novacustom_nv4x_tgl
@@ -1,5 +1,16 @@
CONFIG_LOCALVERSION="v1.6.0-rc2"
CONFIG_OPTION_BACKEND_NONE=y
+CONFIG_SBOM=y
+CONFIG_SBOM_PAYLOAD=y
+CONFIG_SBOM_ME=y
+CONFIG_SBOM_EC=y
+CONFIG_SBOM_SINIT_ACM=y
+CONFIG_SBOM_BIOS_ACM=y
+CONFIG_SBOM_INTEL_MICROCODE=y
+CONFIG_SBOM_INTEL_FSP=y
+CONFIG_SBOM_IFD=y
+CONFIG_SBOM_VBOOT=y
+CONFIG_SBOM_IPXE=y
CONFIG_VENDOR_NOVACUSTOM=y
CONFIG_FMDFILE="src/mainboard/clevo/tgl-u/vboot-rwa.fmd"
# CONFIG_CONSOLE_SERIAL is not setand And using the reproduction steps from Dasharo/dasharo-issues#1878, I get: |
324c4cb to
aeab5ed
Compare
Pulls the goswid change that records a SHA-256 file hash in the CoSWID payload, used by the src/sbom rules below to carry per-component integrity data. Changes .gitmodules to point to Dasharo fork containing the patch. Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
dae56df to
94fde45
Compare
An EU CRA check (sbom-tools --standard cra) on the embedded SBOM flagged two gaps: no component carried a cryptographic hash (Annex I integrity / vendor hash carry-through, an error), and only coreboot declared a license while the other components did not (Art. 13(5)). For every component whose binary is known at build time (Intel ME, IFD, FSP-S/M/T, microcode and the payload) sha256sum the blob and pass it to `goswid add-payload-file --sha256`, which stores it as the CoSWID payload file hash. Add a license link to the remaining tag templates: an SPDX id for the open-source components (edk2, iPXE, vboot) and the upstream license file for the proprietary Intel/Dasharo blobs. Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Identify NovaCustom as the manufacturer of the NUC BOX — the entity that places the finished product on the market under its trademark, which is the manufacturer for CRA purposes (Art. 13(15)). Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Extend the embedded SBOM to cover firmware components that were missing or underspecified, reusing the existing per-component pattern (SBOM_<X> / SBOM_<X>_GENERATE / SBOM_<X>_PATH + CoSWID template + Makefile rule). The _PATH option lets a vendor supply a full external SBOM JSON per blob; GENERATE emits a minimal hashed fallback. New components: - SBOM_VGA_BIOS / _SECOND / _DGPU: the VGA BIOS OptionROMs (VGA_BIOS_FILE and friends). GENERATE records the blob sha256 and the target PCI vendor:device ID from VGA_BIOS_ID. - SBOM_EDK2_GOP: the external Intel GOP driver (EDK2_GOP_FILE) compiled into the edk2 payload. - SBOM_EDK2_LAN_ROM: the external LAN Option ROM driver (EDK2_LAN_ROM_DRIVER) compiled into the edk2 payload. - SBOM_EDK2_PLATFORMS: the edk2-platforms source tree, previously absent from the SBOM. Records the commit and tree hash of the checkout at payloads/external/edk2/workspace/edk2-platforms. Intel FSP enrichment: - Capture the FSP release version, the BIOS build number ((NNNN_NN) -> colloquial-version) and the target (Edge/IoT/Client, derived from the FD path -> edition), plus the SoC package (-> product-family), instead of a single opaque version token. New CoSWID templates are added under src/sbom/ and the new options are documented in Documentation/sbom/sbom.md. All new options default to n, so existing boards' SBOMs are unchanged. Change tested with 'make sbom' on novacustom_nuc_box: FSP now reports edition=IoT, product-family=ArrowLake; edk2-platforms and a VGA BIOS entry (with matching sha256) merge into a valid uSWID when enabled. Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
e9b4367 to
2870964
Compare
Extract ME/TXE version from the firmware binary. Some versions
store it as an ASCII string like: "ME16.1.40.2765".
When the string is missing, try to extract it from the CSE Main program
(NFTP) partition manifest: the version is 4x2 byte LE fields, 8 bytes after
the $MN2 magic string.
How NFTP is located depends on the image layout:
1. When NEED_IFWI & CONFIG_IFWI_FILE_NAME,
=> located in the IFWI image, extract NFTP from CONFIG_IFWI_FILE_NAME with
ifwitool
2. CONFIG_SOC_INTEL_CSE_HAVE_SPEC_SUPPORT=y, image has BPDT, ME_SPEC versioned
=> placed at the last non-empty BPDT partition, extract with cse_serger
1. CONFIG_ME_SPEC >= 15 => version is 1.7
2. 15 > CONFIG_ME_SPEC >= 12 => version is 1.6
3. 12 > CONFIG_ME_SPEC => not possible in such case
CONFIG_SOC_INTEL_CSE_HAVE_SPEC_SUPPORT must be "=n"
3. CONFIG_SOC_INTEL_CSE_HAVE_SPEC_SUPPORT=n
=> ME_SPEC <= 11, no BPDT, use cse_fpt to extract NFTP
Upstream-Status: Pending
Co-authored-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
Open source deps that would otherwise only have a commit hash and tree hash will now instead use `<date>_<hash>` as software-version so that this field is in any way human readable. It will at least give a general idea of how old/new a revision is. coloquial-version is supposed to be used as a string-only release name that groups multiple versions under common major version. Using the latest tag of the dependencies is a valid use and will inform about what upstream release the components base on. It will be the most important field for human readers. Decisions based on the RFC: https://datatracker.ietf.org/doc/rfc9393/ Upstream-Status: Pending Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
|
@philipanda fixed the hashing and backported yout TGL SBOM fixes. Now nv4x_tgl built from this rev passes Phase 2 compliance:
and the LVFS check goes through without erroring out. It's reporting missing info, e.g. about compiler used per component, but SBOM detection itself should now be succesful: |
…as edition Extracting FSP image revision from the binary is the only reliable source of the version number. The Bios version can only be received from commit messages. The SKU type can be extracted from a commit message or directory name, the latter being the more robust method as the commit messages are not guaranteed to contain anything. A well known GUID and offests from the spec are used to detect the FSP info header and extract the version number components. Header spec versions >=6 support extended image revisions and require appending some more bytes to minor and major version revision parts. Upstream-Status: Pending Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
…s to them The two binaries were merged together because all microcode binaries used the same tag-id hardcoded in the json. By using goswid to generate the tag-id fields from filename we get deterministic ids for every ucode binary in a firmare. It won't change as cpuid doesn't change. cpuid output, revision and date of the ucode binary are added to oswid sbom for more details. Upstream-Status: Pending Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
Pull the SHA hashing and early exit error fix Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Set it to the author of the firmware covered by the SBOM, not the hardware distributor. Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Guard parsing the revision with the SBOM_EDK2_PLATFORMS_GENERATE config switch. Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
|
Removed the test configs temporary commit. If anyone wishes to reproduce, here's the patch: Here are example sboms generated with the patches, building from novacustom_nuc_box_mtl_v0.9.2.sbom.json λ for sbom in $(find artifacts/ -type f -name '*.sbom.json'); do
sbom-tools validate --standard cra "$sbom" | grep error -i
done
Status: COMPLIANT (0 errors, 4 warnings, 9 info)
Status: COMPLIANT (0 errors, 5 warnings, 12 info)
Status: COMPLIANT (0 errors, 4 warnings, 10 info)
Status: COMPLIANT (0 errors, 4 warnings, 9 info)They also return no errors on the LVFS check, so their SBOMs should be detected correctly: λ for cab in $(find artifacts/ -type f -name '*.cab'); do
uv run lvfs_sbom_check.py "$cab"
done
('a9032c9d-2aaa-5a25-a0e6-6d865b24e6d2',
[],
['uSwidProblem(kind=entity, description="No regid", since="0.4.7"))',
'uSwidProblem(kind=link, description="Has no COMPILER", since=
(...)
λ for cab in $(find artifacts/ -type f -name '*.cab'); do
uv run lvfs_sbom_check.py "$cab" | grep error -i
done
λ |
It now correctly resolves to BIOS_VENDOR, i.e. 3mdeb Upstream-Status: Inappropriate [Dasharo downstream] Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Upstream-Status: Pending Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>

Upstream-Status: Pending