SBOM for Embedded Firmware: Why Your Python-Generated List Won't Pass a CRA Audit
Ask a backend team for a software bill of materials and you get a clean answer in about four seconds, because a package manager already knows. Every dependency was declared, resolved, versioned and locked by a tool whose entire job is knowing what is installed.
Firmware has no such tool, because firmware has no such moment. An image is not installed, it is linked. What ends up in flash arrived through half a dozen mechanisms, most of which leave no record, and a list generated from the one mechanism that does keep records will describe a small fraction of what you shipped.
What is actually in the image
Walk a typical connected-product image and count the origins:
- An RTOS, very likely a fork — vendor-patched, or locally patched for a scheduling bug three years ago.
- The silicon vendor's HAL and board-support package, vendored into your tree as source, with no version anywhere except a comment in a header.
- Radio and connectivity stacks, often precompiled binary blobs under NDA, shipped as a .a with a filename that encodes a version the vendor does not publish notes for.
- A crypto library, configured down with a dozen build flags, which means the CVE that applies to the upstream project may or may not apply to your build.
- Toolchain runtime — libgcc, a C library such as newlib or picolibc — linked in, third-party, and almost never listed.
- ROM code you did not write, cannot patch, and are nonetheless shipping.
- Bootloader, possibly a different project with a different licence and its own dependency set.
A dependency-manager-style list captures, at best, the middleware you fetched with a package tool. Everything vendored, every blob and the entire toolchain runtime are invisible to it. That is the gap an auditor walks into.
The blob problem
A binary you cannot inspect still has to appear in the inventory, and you will not get a component version from it by scanning. The honest entry records what you actually know: the supplier, the filename and build identifier as delivered, a cryptographic hash of the exact artifact you linked, and the date and channel you received it on. A hash is not a version, but it is verifiable and it is true, which puts it well ahead of a guessed version string.
This also gives you something operationally useful. When the vendor eventually publishes an advisory, the question "did we ship the affected build" becomes a hash comparison rather than an archaeology project.
What the regulation actually requires
Annex I Part II of the CRA asks for an SBOM in a commonly used, machine-readable format, covering at the very least the top-level dependencies of the product.
Two things follow, and they pull in opposite directions. First, the bar is lower than the SBOM discourse implies — top-level dependencies, machine-readable, that is the floor. Second, "at the very least" is doing real work in that sentence, and a top-level-only SBOM will not answer the question the reporting clock asks you. Vulnerabilities do not respect dependency depth. The compression library that becomes your emergency is three levels down, statically linked, and not top-level anything.
So there are two documents in play and it is worth being deliberate about which you are building: the compliance artifact, which satisfies the text, and the operational inventory, which lets you answer an exposure question in minutes. Build the second and the first falls out of it. Build only the first and you will build the second anyway, in an emergency, at three in the morning.
Format: prefer CycloneDX here
SPDX and CycloneDX are both accepted machine-readable formats and both are fine choices for software. For firmware, CycloneDX has two features that matter enough to decide it:
- Component types beyond "library" — it can distinguish firmware, device, and file-level components, which is how embedded images are actually shaped.
- Pedigree — a first-class way to say "this is upstream version X, with these patches applied." Given that a patched vendor fork is the normal case in embedded, a format that cannot express it will force you to lie by omission.
{
"type": "library",
"name": "some-rtos",
"version": "10.4.3",
"purl": "pkg:generic/some-rtos@10.4.3",
"hashes": [
{ "alg": "SHA-256", "content": "9f2b...c41a" }
],
"pedigree": {
"patches": [
{
"type": "backport",
"diff": { "url": "https://internal/patches/tcp-window-fix.diff" },
"resolves": [
{ "type": "security", "id": "CVE-0000-00000" }
]
}
]
}
}
That fragment says something a flat list cannot: the component is a fork, here is what was changed, and here is which issue the change addresses. An auditor asking "you list an affected version, why are you not affected" has their answer in the document instead of in a meeting.
Generate it from the build, not from a scan
The reliable source of truth for what is in an image is the thing that produced the image. A post-hoc binary scan is a heuristic; your linker has the facts.
In practice that means the SBOM is a build artifact, emitted by the same CI job that emits the image, from the map file and the dependency manifests, with blob hashes computed at link time. Three properties make it trustworthy: it is regenerated on every build so it cannot drift, it is versioned alongside the image so you can retrieve the inventory for any firmware that ever shipped, and it fails the build when a component appears with no recorded origin. That last rule is the one that keeps the document honest a year later.
The archive matters as much as the generation. You will be asked about an image you shipped eighteen months ago, on a support period measured in years. An SBOM that only describes main is not an inventory, it is a snapshot.
‹FILL› — Your own toolchain reality: which build system you generate from, what your worst undocumented component actually was, and how long the first honest inventory of a shipping image took you. Two paragraphs. The concrete number is what makes the argument land, because every reader is quietly guessing at their own.
What to do on Monday
- Take one shipping image and list every third-party artifact in it, by hand, including the toolchain runtime and any blob. Note where the version came from. Entries where the answer is "a comment in a header" are your risk.
- Hash every binary blob you link and commit the hashes. Do this even before you pick a format — it is the part you cannot reconstruct later.
- Emit a CycloneDX document from CI next to the image, and archive both under the same version tag.
- Add a build rule that fails on a component with no recorded supplier and no hash.
Shipping before December 2027? Grab the CRA Compliance Checklist for Embedded Engineers — free, 3 pages, no marketing.
FAQ
What I'm writing about next
A bench walkthrough of CRA Annex I, requirement by requirement, against a real ESP32-based product — what passes, what fails, and what an auditor will probably argue about.
One post a week, plus the CRA checklist on signup.
No marketing.
If this was useful, the best compliment is forwarding it to a teammate.