feat(yocto): a target with only its build output is scanned (#150) #857

Merged
sharang merged 2 commits from feat/yocto-build-output-only into main 2026-11-05 00:13:12 +00:00
Owner

#150 follow-up. Tracker #167.

Why

A Yocto target with only its build output (image SPDX archive, cve-check report), and no layers in git or as an archive, was not scanned: run_target's no-code branch only tries DAST. A customer who delivers a device rather than layers looks exactly like that.

What

  • scan_build_output_only runs when a target has build outputs and no code artifact. It runs scan_tree over an empty directory under the agent's work dir, created fresh and removed after the run, with the build outputs attached. So SBOM, NVD, cve-check, VEX, persistence, issues and finalize_target are the same code as for a layer tree. The run gets source_code under Nicht ausgeführt, saying that code analysis, recipe inventory and lint need the layer tree.
  • scan_matrix: the Yocto image SBOM and CVE rules are on (default on), with the new ArtifactRequirement::BuildOutput. Previously they were "unavailable: … needs build artefacts (SPDX/manifest), planned". Without a build output they are blocked with "no build_output artifact provided", which the dashboard renders as "braucht die Build-Ergebnisse des Images (Image-SPDX, cve-check)". The now-unused "planned" texts are removed.
  • Docs: the guide/yocto table row, and a new paragraph Without the layers.

Tests

  • The matrix test is rewritten:
    • without a build output, both rules require build_output and are blocked with that reason;
    • with one image SPDX archive and no layers, both are on and unblocked;
    • DAST and pentest are unchanged.
  • The dashboard reason test now covers the new text.
  • The scan path reuses scan_tree. The nightly target fw-yocto-built (layers plus build output) is unchanged. Adding a build-output-only nightly target is an option if wanted.
  • CI only.

🤖 Generated with Claude Code

#150 follow-up. Tracker #167. ## Why A Yocto target with only its build output (image SPDX archive, cve-check report), and no layers in git or as an archive, was not scanned: `run_target`'s no-code branch only tries DAST. A customer who delivers a device rather than layers looks exactly like that. ## What - **`scan_build_output_only`** runs when a target has build outputs and no code artifact. It runs `scan_tree` over an empty directory under the agent's work dir, created fresh and removed after the run, with the build outputs attached. So SBOM, NVD, cve-check, VEX, persistence, issues and `finalize_target` are the same code as for a layer tree. The run gets `source_code` under *Nicht ausgeführt*, saying that code analysis, recipe inventory and lint need the layer tree. - **`scan_matrix`**: the Yocto image **SBOM** and **CVE** rules are on (default on), with the new `ArtifactRequirement::BuildOutput`. Previously they were "unavailable: … needs build artefacts (SPDX/manifest), planned". Without a build output they are blocked with "no build_output artifact provided", which the dashboard renders as "braucht die Build-Ergebnisse des Images (Image-SPDX, cve-check)". The now-unused "planned" texts are removed. - **Docs**: the `guide/yocto` table row, and a new paragraph *Without the layers*. ## Tests - The matrix test is rewritten: - without a build output, both rules require `build_output` and are blocked with that reason; - with one image SPDX archive and no layers, both are on and unblocked; - DAST and pentest are unchanged. - The dashboard reason test now covers the new text. - The scan path reuses `scan_tree`. The nightly target `fw-yocto-built` (layers plus build output) is unchanged. Adding a build-output-only nightly target is an option if wanted. - CI only. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sharang added 1 commit 2026-11-04 23:41:15 +00:00
feat(yocto): a target with only its build output is scanned (#150)
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 / Agent integration (pull_request) Successful in 3m27s
CI / Check (pull_request) Failing after 13m15s
fd7f084ad8
A Yocto target whose only input is its build output (the image SPDX
archive, the cve-check report), without the layers in git or an
archive, was not scanned: run_target's no-code branch only tries DAST.
That is the likely shape of a customer who ships a device, not layers.

- run_target: such a target runs scan_tree over an empty working
  directory under the agent's work dir, with the build outputs attached,
  so the SBOM, NVD, cve-check, VEX, issues and finalisation are the same
  as for a layer tree. The run lists source_code under "Nicht
  ausgeführt" (code analysis, recipe inventory and lint need the layers).
- scan_matrix: the Yocto image SBOM and CVE rules are on, with a new
  ArtifactRequirement::BuildOutput, instead of "planned"; without a
  build output they read "no build_output artifact provided", which the
  dashboard words as "needs the image's build output".
- guide/yocto: what runs, and "Without the layers".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang added 1 commit 2026-11-04 23:55:43 +00:00
fix(test): pick the image rule, not the umbrella's source SBOM
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 / Agent integration (pull_request) Successful in 4m2s
CI / Check (pull_request) Successful in 17m1s
baebcba267
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang merged commit 360c905894 into main 2026-11-05 00:13:12 +00:00
Sign in to join this conversation.