fix(sbom): firmware SBOMs list what the manifests declare (#317) #327

Merged
sharang merged 2 commits from feat/firmware-sbom-libraries into main 2026-09-22 20:34:07 +00:00
Owner

Closes #317. Part of #309. Depends on platform/firmwerk#38.

Before

Every firmware target produced a toolchain with an empty version and no libraries, whatever the build system, because the analysis-only path could only report libraries a build had already fetched. The reproducible build is off in shared deployments, so that is the path customers get.

After

Firmwerk reads the manifests and renders the analysis-only SBOM through the same model as a sealed build, so this side only maps its components (Sbom::from_plan → sbom_to_entries).

Fixture Firmware SBOM now
fw-zephyr-pinned zephyr v3.6.0 + cmsis, hal_nordic, mbedtls, toolchain zephyr-sdk
fw-espidf esp-idf, espressif/led_strip 2.5.3, espressif/mdns
fw-platformio espressif32 6.5.0, bblanchon/ArduinoJson 7.0.4, knolleary/PubSubClient 2.8 (it used to record a skipped stage: nothing resolved)
fw-freertos-cmake freertos_kernel V11.1.0
fw-cargo-embedded toolchain rustc 1.82.0
fw-zephyr-example-pinned zephyr + cmsis_6, hal_nordic, hal_stm32

purls come along, so a GitHub-sourced dependency joins against OSV/NVD: pkg:github/zephyrproject-rtos/zephyr@v3.6.0.

Ranges are not versions

A manifest that declares ^1.2.0 or >=5.1.2 pins nothing. Those rows carry a new version_requirement and leave version empty, so CVE matching never joins on a range, and the dashboard shows ^1.2.0 (declared) instead of a blank cell.

Syft file components

Syft catalogued each GitHub Actions workflow as a package named by its absolute clone path (unknown:/tmp/compliance-scanner/repos/.../build.yml@unknown) — the third symptom in #317. Those file components are dropped; the actions it finds keep their own purls.

Verified

  • All 20 nightly targets re-blessed on a fresh database and compared on a second fresh one: pass, no diff. Re-verified after the Firmwerk refactor commit.
  • cargo fmt --check, clippy with the CI flags for agent, core and both dashboard feature sets, cargo test (364 agent, 67 core).

Merge order: platform/firmwerk#38 first, then release it and repoint this from the pinned revision to the tag.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Closes #317. Part of #309. Depends on **platform/firmwerk#38**. ## Before Every firmware target produced a toolchain with an empty version and **no libraries**, whatever the build system, because the analysis-only path could only report libraries a *build* had already fetched. The reproducible build is off in shared deployments, so that is the path customers get. ## After Firmwerk reads the manifests and renders the analysis-only SBOM through the same model as a sealed build, so this side only maps its components (`Sbom::from_plan` → `sbom_to_entries`). | Fixture | Firmware SBOM now | |---|---| | `fw-zephyr-pinned` | `zephyr v3.6.0` + `cmsis`, `hal_nordic`, `mbedtls`, toolchain `zephyr-sdk` | | `fw-espidf` | `esp-idf`, `espressif/led_strip 2.5.3`, `espressif/mdns` | | `fw-platformio` | `espressif32 6.5.0`, `bblanchon/ArduinoJson 7.0.4`, `knolleary/PubSubClient 2.8` (it used to record a skipped stage: nothing resolved) | | `fw-freertos-cmake` | `freertos_kernel V11.1.0` | | `fw-cargo-embedded` | toolchain `rustc 1.82.0` | | `fw-zephyr-example-pinned` | `zephyr` + `cmsis_6`, `hal_nordic`, `hal_stm32` | purls come along, so a GitHub-sourced dependency joins against OSV/NVD: `pkg:github/zephyrproject-rtos/zephyr@v3.6.0`. ## Ranges are not versions A manifest that declares `^1.2.0` or `>=5.1.2` pins nothing. Those rows carry a new `version_requirement` and leave `version` empty, so CVE matching never joins on a range, and the dashboard shows `^1.2.0 (declared)` instead of a blank cell. ## Syft file components Syft catalogued each GitHub Actions workflow as a package named by its absolute clone path (`unknown:/tmp/compliance-scanner/repos/.../build.yml@unknown`) — the third symptom in #317. Those `file` components are dropped; the actions it finds keep their own purls. ## Verified - All 20 nightly targets re-blessed on a fresh database and compared on a second fresh one: pass, no diff. Re-verified after the Firmwerk refactor commit. - `cargo fmt --check`, clippy with the CI flags for agent, core and both dashboard feature sets, `cargo test` (364 agent, 67 core). **Merge order:** platform/firmwerk#38 first, then release it and repoint this from the pinned revision to the tag. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-22 20:07:46 +00:00
fix(sbom): firmware SBOMs list what the manifests declare (#317)
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 6m28s
6dbf58638e
A firmware SBOM held a toolchain with no version and no libraries at all,
for every build system, because the analysis path could only report
libraries a build had already fetched. Zephyr and its modules, ESP-IDF
components, PlatformIO platform and lib_deps, and CMake FetchContent
packages were all missing, and the reproducible build is off in shared
deployments, so that path is the one customers get.

Firmwerk now reads those manifests (platform/firmwerk#38) and renders the
analysis-only SBOM through the same model as a sealed build, so this side
just maps its components:

    zephyr-pinned  toolchain:zephyr-sdk, zephyr v3.6.0, cmsis,
                   hal_nordic, mbedtls
    espidf         esp-idf, espressif/led_strip 2.5.3, espressif/mdns
    platformio     espressif32 6.5.0, ArduinoJson 7.0.4, PubSubClient 2.8
    freertos-cmake freertos_kernel V11.1.0
    cargo-embedded toolchain:rustc 1.82.0

A manifest that declares a range pins no version, so the row carries a
`version_requirement` instead and the dashboard shows "^1.2.0 (declared)"
rather than an empty cell. Nothing presents a range as the version CVE
matching joins on.

Also drops Syft's `file` components: it catalogued each GitHub Actions
workflow as a package named by its absolute clone path, which is the
third symptom in #317.

The firmwerk dependency is pinned by revision until that PR is released
and tagged.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-22 20:19:03 +00:00
chore(deps): firmwerk v0.6.0
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 6m57s
e854428cbc
Replaces the revision pin now that the declared-dependency SBOM is
released (platform/firmwerk#38, tag v0.6.0).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit 27e8c866ba into main 2026-09-22 20:34:07 +00:00
sharang deleted branch feat/firmware-sbom-libraries 2026-09-22 20:34:07 +00:00
Sign in to join this conversation.