feat(ci): firmware and RTOS fixtures for the nightly scan regression (#313) #326

Merged
sharang merged 1 commits from feat/nightly-firmware-fixtures into main 2026-09-22 05:36:10 +00:00
Owner

Closes #313. Part of #309.

What

Eleven firmware/RTOS targets for the nightly scan regression, all uploaded as source archives. The harness zips a fixture directory on upload, so the trees stay plain files in the repo.

Kind Targets
bare metal Make, CMake (toolchain file), Arduino (sketch.yaml), PlatformIO (extra_configs, pinned platform, lib_deps), embedded Rust (cross target, rust-toolchain.toml)
RTOS ESP-IDF (idf_component.yml), Zephyr (west.yml at v3.6.0 with module imports), FreeRTOS via CMake FetchContent, FreeRTOS from headers only (source archaeology)
unsupported a Yocto layer, which must be reported as not analysed
pinned real project zephyrproject-rtos/example-application @ 38a6d9b, downloaded by the workflow into NIGHTLY_ZEPHYR_EXAMPLE (codeload zips aren't byte-stable, so the commit pin is the guarantee)

Most trees are copied from Firmwerk v0.4.2's provider fixtures and extended with the manifests a real project carries. fixtures/nightly/firmware/README.md records where each one comes from.

Fixes the fixtures found

  • Wrapper folder: GitHub-style zips (a single top-level repo-<sha>/ folder) are now unwrapped at ingest. The Zephyr example was detected as build_system: none, language: python. The descent uses DirEntry::file_type, so it never follows a symlink out of the work dir.
  • Silent empty firmware SBOM: a firmware target now records a skipped firmware_sbom stage with the reason. The reasons are: no supported build system (Yocto), a build detected with nothing resolvable without building it (PlatformIO), an analysis failure, or a timeout.
  • Silent source-archive skip: uploaded source archives now record a skipped code_scan stage. SAST, secrets and the package SBOM run on git repos only. That was only a log line before; it is filed as #325.

Baselines

They capture today's behaviour, which is thin: each provider yields a toolchain with an empty version and no libraries. #317 now has the per-provider table and the causes:

  • Firmwerk doesn't read west.yml, idf_component.yml, lib_deps or FetchContent.
  • Our libraries_from_inputs path keeps only fetched libraries.
  • Plan gaps aren't surfaced on the scan run.

Fixing #317 will re-bless these baselines, and the diff will show the gain.

Verified

  • Local, against the agent built from this branch (bookworm, source_only, dev tenant). All 20 nightly targets were blessed on a fresh DB, then compared on a second fresh DB: pass, no diff. Existing baselines are unchanged.
  • cargo fmt --check, cargo clippy -p compliance-agent -- -D warnings, cargo test -p compliance-agent --lib (362 pass). New tests: wrapper unwrap, the Yocto skip reason, and the Make toolchain.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Closes #313. Part of #309. ## What Eleven firmware/RTOS targets for the nightly scan regression, all uploaded as source archives. The harness zips a fixture directory on upload, so the trees stay plain files in the repo. | Kind | Targets | |---|---| | bare metal | Make, CMake (toolchain file), Arduino (`sketch.yaml`), PlatformIO (`extra_configs`, pinned platform, `lib_deps`), embedded Rust (cross target, `rust-toolchain.toml`) | | RTOS | ESP-IDF (`idf_component.yml`), Zephyr (`west.yml` at v3.6.0 with module imports), FreeRTOS via CMake `FetchContent`, FreeRTOS from headers only (source archaeology) | | unsupported | a Yocto layer, which must be *reported* as not analysed | | pinned real project | `zephyrproject-rtos/example-application` @ `38a6d9b`, downloaded by the workflow into `NIGHTLY_ZEPHYR_EXAMPLE` (codeload zips aren't byte-stable, so the commit pin is the guarantee) | Most trees are copied from Firmwerk v0.4.2's provider fixtures and extended with the manifests a real project carries. `fixtures/nightly/firmware/README.md` records where each one comes from. ## Fixes the fixtures found - **Wrapper folder:** GitHub-style zips (a single top-level `repo-<sha>/` folder) are now unwrapped at ingest. The Zephyr example was detected as `build_system: none, language: python`. The descent uses `DirEntry::file_type`, so it never follows a symlink out of the work dir. - **Silent empty firmware SBOM:** a firmware target now records a skipped `firmware_sbom` stage with the reason. The reasons are: no supported build system (Yocto), a build detected with nothing resolvable without building it (PlatformIO), an analysis failure, or a timeout. - **Silent source-archive skip:** uploaded source archives now record a skipped `code_scan` stage. SAST, secrets and the package SBOM run on git repos only. That was only a log line before; it is filed as **#325**. ## Baselines They capture today's behaviour, which is thin: each provider yields a toolchain with an **empty version** and **no libraries**. #317 now has the per-provider table and the causes: - Firmwerk doesn't read `west.yml`, `idf_component.yml`, `lib_deps` or `FetchContent`. - Our `libraries_from_inputs` path keeps only *fetched* libraries. - Plan gaps aren't surfaced on the scan run. Fixing #317 will re-bless these baselines, and the diff will show the gain. ## Verified - Local, against the agent built from this branch (bookworm, `source_only`, dev tenant). All 20 nightly targets were blessed on a fresh DB, then compared on a second fresh DB: pass, no diff. Existing baselines are unchanged. - `cargo fmt --check`, `cargo clippy -p compliance-agent -- -D warnings`, `cargo test -p compliance-agent --lib` (362 pass). New tests: wrapper unwrap, the Yocto skip reason, and the Make toolchain. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-21 22:00:16 +00:00
feat(ci): firmware and RTOS fixtures for the nightly scan regression (#313)
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 6m27s
c509a154a9
Eleven source-archive targets cover every Firmwerk provider: Make, CMake,
Arduino, PlatformIO, embedded Rust, ESP-IDF, Zephyr (west.yml), FreeRTOS
via CMake FetchContent and via source archaeology, a Yocto layer that must
be reported as unsupported, and the upstream Zephyr example application
at a pinned commit (downloaded by the workflow). The harness zips fixture
directories on upload, so the trees stay reviewable in the repository.

Fixes the fixtures turned up:
- Archives wrapped in a single top-level folder (GitHub's "Download ZIP")
  are unwrapped at ingest; the Zephyr example read as "no build system".
- A firmware target without a firmware SBOM records a skipped
  firmware_sbom stage with the reason (no supported build system, nothing
  resolvable without a build, analysis failure or timeout).
- Source archives record a skipped code_scan stage: SAST, secrets and the
  package SBOM run on git repositories only (#325).

The baselines capture today's thin analysis-only SBOM (toolchain without a
version, no libraries); #317 tracks the gaps and will re-bless them.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit 42c7b09151 into main 2026-09-22 05:36:10 +00:00
sharang deleted branch feat/nightly-firmware-fixtures 2026-09-22 05:36:11 +00:00
Sign in to join this conversation.