Generate and Check an SPDX SBOM with Yocto
Prepare a version pinned Yocto SPDX workflow, capture build provenance and review package coverage before using an SBOM as evidence.
By Cenitia
Yocto can generate SPDX documents from the build, but useful evidence requires a pinned configuration and a coverage review. Enabling the class is the beginning of the workflow; it does not prove that every software element in your finished device is inventoried.
This workflow targets the Yocto 5.0.13 documentation and a QEMU demo image. Use the run record to capture your checkout, configuration, actual outputs and coverage checks.
Why the release pin matters
For this documented release, SBOM generation is enabled by inheriting create-spdx; output locations and options are described in the 5.0.13 SBOM guide. Newer development documentation can describe different defaults or output. Do not combine instructions from those branches without checking the implementation you actually use.
Use the supported Linux host and dependencies described by the matching Yocto system requirements. Plan sufficient disk and build time. This is a cross compilation workflow; installing a Python package named similarly is not a substitute.
Pin the source and initialise a clean build
The prepared commands assume a fresh working directory and a configured Linux host. Confirm that the release tag resolves before beginning. The run owner must record the resolved commit, host distribution, dependency versions and available storage.
git clone --branch yocto-5.0.13 --single-branch https://git.yoctoproject.org/poky
cd poky
git rev-parse HEAD
source oe-init-build-env build-sbom-demo
Do not run the remaining steps inside a production build directory without reviewing the configuration. A separate demo build makes its assumptions easier to inspect and avoids silently changing a customer's release settings.
Enable SPDX for the selected demo
Edit conf/local.conf and keep a copy of the final effective configuration. Use the following configuration for the demo:
MACHINE = "qemux86-64"
INHERIT += "create-spdx"
SPDX_PRETTY = "1"
bitbake core-image-minimal
find tmp/deploy/images/qemux86-64 -name '*.spdx*' -type f
find tmp/deploy/spdx -name '*.json' -type f
These are commands to execute, not captured results. Preserve the BitBake log and inventory the actual outputs. Do not paste an expected filename into the results section if the build produced something different.
Optional source and package archives increase detail and storage requirements. Review distribution permissions and whether the exported bundle contains proprietary source before making it public. A useful internal SBOM can contain information that needs a separate disclosure review.
Compare the output with the image
Begin with the image package manifest and generated recipe or package documents. Select several known packages and trace them through identifiers and relationships. Include a custom application recipe in a later real product trial rather than assuming the default image demonstrates your own software coverage.
| Coverage boundary | What the run owner should check |
|---|---|
| Packages installed in the root filesystem | Manifest entries map to the generated inventory |
| Static libraries | Linked dependencies are considered, not only runtime package names |
| Bootloader and recovery software | Separate artefacts are included or recorded as gaps |
| Radio or coprocessor firmware | Vendor binaries have explicit identities and limitations |
| Software added after the image build | Post-processing and field installation do not escape inventory |
The table is our review method. The generated SPDX archive cannot, by itself, establish coverage of software that was never part of the configured build.
Keep provenance alongside the SBOM
Record layer commits, bblayers.conf, local.conf, build command, generator configuration, image and SBOM hashes, warnings and the manifest comparison. If the process fails, retain the failure and corrective action. A failed reproducibility attempt is more useful than a fabricated successful transcript.
If your actual project uses a different Yocto release, repeat the workflow with matching release documentation and describe the differences. Avoid claiming that the resulting SBOM constitutes a security assessment or complete CRA conformity.
Validate the result on your target
Complete a clean build, retain actual output excerpts and hashes, and have an embedded engineer review the coverage. A successful QEMU run checks the demo procedure; evidence about your product requires a build and coverage review for that product.
CRA applicability and timing
Most CRA product obligations apply from 11 December 2027; manufacturer Article 14 reporting applies from 11 September 2026. Check the product scope, role and specific transitional provisions before treating a future requirement as a current duty. See the Commission manufacturer guidance and reporting guidance.
Continue reading
Related guides
tutorial
CycloneDX VEX for Embedded Firmware with an Evidence Based Example
Write a scoped CycloneDX VEX decision for embedded firmware with explicit evidence, release identity and reassessment triggers.
4 min read
tutorial
CRA Cybersecurity Risk Assessment for an IoT Gateway
Create an IoT gateway risk register that connects product boundaries, abuse cases, security controls and verifiable release evidence.
4 min read
tutorial
How to Validate an SBOM Beyond Passing the JSON Schema
Validate SBOM structure, identity, dependency links and release coverage with deliberately weak and improved CycloneDX fixtures.
4 min read
guide
CRA Support Period for Hardware and How to Document Your Decision
Document a defensible CRA support period using expected product use, dependencies and an explicit customer support end date.
4 min read
Put this into practice
Free tools & references
- CRA Readiness CheckerScore your product against the Cyber Resilience Act essential requirements.Open tool →
- EU Directive SelectorDescribe your product and find which EU directives and regulations apply.Open tool →
New to the terminology? Browse the compliance glossary — plain-English, citation-backed definitions of every term above.