Fixes#1043, found while testing supplier SBOMs on stage (#1025).
Cause
A scan has one rule in the scan matrix for each artifact it can read: code, a firmware image, a supplier SBOM. GET /api/v1/targets/{id}/applicable-scans listed every rule. On a firmware target with only a supplier SBOM, the wizard and the target page therefore showed "Stückliste" and "Bekannte Schwachstelle (CVE)" three times each:
blocked, "braucht Quellcode";
blocked, "Firmware-Images werden noch nicht entpackt";
running, from the supplier SBOM.
That reads as if the SBOM weren't used.
What
The endpoint lists a scan the target runs once, as running. The rules that would need another artifact are left out for it.
A scan nothing runs keeps every reason why not, as before.
The scan plan is unchanged.build_scan_plan still binds each rule to its artifact; only the list the dashboard shows changes.
Tests
Unit: a running scan is listed once and a blocked scan keeps its reason; a scan that runs nowhere keeps both reasons.
Integration: the supplier SBOM test now also checks that SBOM and CVE each appear exactly once.
Local runs: the agent test suite is green, and clippy --all-targets -D warnings is clean.
Fixes #1043, found while testing supplier SBOMs on stage (#1025).
## Cause
A scan has one rule in the scan matrix for each artifact it can read: code, a firmware image, a supplier SBOM. `GET /api/v1/targets/{id}/applicable-scans` listed every rule. On a firmware target with only a supplier SBOM, the wizard and the target page therefore showed "Stückliste" and "Bekannte Schwachstelle (CVE)" three times each:
- blocked, "braucht Quellcode";
- blocked, "Firmware-Images werden noch nicht entpackt";
- running, from the supplier SBOM.
That reads as if the SBOM weren't used.
## What
- **The endpoint lists a scan the target runs once**, as running. The rules that would need another artifact are left out for it.
- **A scan nothing runs** keeps every reason why not, as before.
- **The scan plan is unchanged.** `build_scan_plan` still binds each rule to its artifact; only the list the dashboard shows changes.
## Tests
- **Unit:** a running scan is listed once and a blocked scan keeps its reason; a scan that runs nowhere keeps both reasons.
- **Integration:** the supplier SBOM test now also checks that SBOM and CVE each appear exactly once.
- **Local runs:** the agent test suite is green, and clippy `--all-targets -D warnings` is clean.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
A scan has one rule per artifact it can read; the endpoint listed each,
so a target with only a supplier SBOM showed its SBOM and CVE scans
three times, twice as blocked ('braucht Quellcode', 'Firmware-Images
werden noch nicht entpackt'). Once one rule runs a scan, the endpoint now
lists it once, as running; a scan none runs keeps every reason why not.
The scan plan still binds each rule to its artifact.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
sharang
merged commit 31b8cb9d37 into main2026-11-17 16:46:33 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #1043, found while testing supplier SBOMs on stage (#1025).
Cause
A scan has one rule in the scan matrix for each artifact it can read: code, a firmware image, a supplier SBOM.
GET /api/v1/targets/{id}/applicable-scanslisted every rule. On a firmware target with only a supplier SBOM, the wizard and the target page therefore showed "Stückliste" and "Bekannte Schwachstelle (CVE)" three times each:That reads as if the SBOM weren't used.
What
build_scan_planstill binds each rule to its artifact; only the list the dashboard shows changes.Tests
--all-targets -D warningsis clean.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9
A scan has one rule per artifact it can read; the endpoint listed each, so a target with only a supplier SBOM showed its SBOM and CVE scans three times, twice as blocked ('braucht Quellcode', 'Firmware-Images werden noch nicht entpackt'). Once one rule runs a scan, the endpoint now lists it once, as running; a scan none runs keeps every reason why not. The scan plan still binds each rule to its artifact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q9inRcu428A2iNjDHPEAT9