feat(scans): a scan run lists informational notes apart from skipped stages #556

Merged
sharang merged 3 commits from feat/scan-run-notes into main 2026-10-09 18:21:29 +00:00
Owner

A scan run now has a notes array for informational entries about stages that ran. The dashboard shows them as "Hinweise / Notes" with muted styling, after "Nicht ausgeführt / Not run". "Nicht ausgeführt" keeps only real skips and failures.

Classification (SkipCode::is_informational, exhaustive match)

Note (the stage ran; this is context):

  • VendorCode: vendor/third-party dirs left out of SAST (sast_vendor_code) and upstream Yocto layers left out of the recipe lint (recipe_lint_upstream); still covered by the SBOM
  • SuppressedInSource: # nooelint suppression count (recipe_lint_suppressed, #554)
  • NotInTree: image install names that are not recipes in the tree (image_install, #557)

Stays a skip (a stage or part did not run, failed, or is not analysed yet):

  • FeatureDisabled, ToolFailed, NotAnalysedYet, FirmwareSbomFailed, FirmwareBuildUnknown, FirmwareUnresolved
  • SubmodulesNotFetched, LfsNotFetched, TooLargeToScan (files not scanned: a coverage gap)
  • DependenciesUnlocked (versions/CVEs unknown; also drives SBOM coverage)
  • CveLookupIncomplete: "CVE-Abgleich unvollständig" (NVD/OSV leftovers) is a skipped stage cve_lookup. Components were not matched, so it is a gap and stays a skip (it also feeds tool_of_stage → osv)
  • ArchiveUnreadable, ArtifactNotIngested, ArchivePasswordRequired, ArchivePasswordWrong
  • NoNewCommits, UploadUnchanged (the scan was not run again)
  • PlatformProjectGenerated (the Unity-generated native project is not checked)

Implementation

  • core: ScanRun.notes: Vec<RunNote> (RunNote = SkippedStage, same shape, status note). SkippedStage::new sets status note for an informational code. is_note(), ScanRun::skips(), all_notes(), split_notes().
  • agent: skip_stage pushes informational entries to notes; call sites unchanged.
  • Backwards compatibility: no data migration. Old runs keep notes in skipped_stages. The dashboard reads skips() / all_notes(). GET /api/v1/scan-runs, MCP get_scan_results and the evidence manifest call split_notes() on read, so they return a separate notes array and skipped_stages holds only real skips.
  • GET /api/v1/stats/overview recent scans and the targets' last scan run also split on read.
  • Evidence: last_scan_run.notes added to the manifest. failed_tools and sbom_coverage read only skips(), so control status ("not assessed") and coverage don't change.
  • Nightly: Snapshot.notes is compared exactly (omitted when empty). sast_vendor_code moved from skipped_stages to notes in 4 baselines (dotnet-framework48, fw-c-sensor-node, fw-embedded-libs, mobile-unity-mobile). fw-yocto-layer moves image_install (#557) to notes.

Tests

  • core: only_code_exclusions_and_suppressions_are_informational, an_informational_entry_is_recorded_as_a_note, an_old_run_lists_its_informational_skips_as_notes, scan_runs_without_notes_deserialize_with_none
  • agent: evidence::tests::notes_leave_the_control_status_alone, evidence::tests::the_manifest_lists_the_last_runs_notes_apart_from_its_skips, nightly unit::exact_sets_report_both_directions_and_at_least_sets_only_losses (now covers notes)
  • dashboard: scan_runs::tests::an_old_runs_informational_skip_is_listed_as_a_note

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

A scan run now has a `notes` array for informational entries about stages that ran. The dashboard shows them as "Hinweise / Notes" with muted styling, after "Nicht ausgeführt / Not run". "Nicht ausgeführt" keeps only real skips and failures. ## Classification (`SkipCode::is_informational`, exhaustive match) **Note** (the stage ran; this is context): - `VendorCode`: vendor/third-party dirs left out of SAST (`sast_vendor_code`) and upstream Yocto layers left out of the recipe lint (`recipe_lint_upstream`); still covered by the SBOM - `SuppressedInSource`: `# nooelint` suppression count (`recipe_lint_suppressed`, #554) - `NotInTree`: image install names that are not recipes in the tree (`image_install`, #557) **Stays a skip** (a stage or part did not run, failed, or is not analysed yet): - `FeatureDisabled`, `ToolFailed`, `NotAnalysedYet`, `FirmwareSbomFailed`, `FirmwareBuildUnknown`, `FirmwareUnresolved` - `SubmodulesNotFetched`, `LfsNotFetched`, `TooLargeToScan` (files not scanned: a coverage gap) - `DependenciesUnlocked` (versions/CVEs unknown; also drives SBOM coverage) - `CveLookupIncomplete`: "CVE-Abgleich unvollständig" (NVD/OSV leftovers) is a skipped stage `cve_lookup`. Components were not matched, so it is a gap and stays a skip (it also feeds `tool_of_stage` → osv) - `ArchiveUnreadable`, `ArtifactNotIngested`, `ArchivePasswordRequired`, `ArchivePasswordWrong` - `NoNewCommits`, `UploadUnchanged` (the scan was not run again) - `PlatformProjectGenerated` (the Unity-generated native project is not checked) ## Implementation - core: `ScanRun.notes: Vec<RunNote>` (`RunNote = SkippedStage`, same shape, status `note`). `SkippedStage::new` sets status `note` for an informational code. `is_note()`, `ScanRun::skips()`, `all_notes()`, `split_notes()`. - agent: `skip_stage` pushes informational entries to `notes`; call sites unchanged. - Backwards compatibility: no data migration. Old runs keep notes in `skipped_stages`. The dashboard reads `skips()` / `all_notes()`. `GET /api/v1/scan-runs`, MCP `get_scan_results` and the evidence manifest call `split_notes()` on read, so they return a separate `notes` array and `skipped_stages` holds only real skips. - `GET /api/v1/stats/overview` recent scans and the targets' last scan run also split on read. - Evidence: `last_scan_run.notes` added to the manifest. `failed_tools` and `sbom_coverage` read only `skips()`, so control status ("not assessed") and coverage don't change. - Nightly: `Snapshot.notes` is compared exactly (omitted when empty). `sast_vendor_code` moved from `skipped_stages` to `notes` in 4 baselines (dotnet-framework48, fw-c-sensor-node, fw-embedded-libs, mobile-unity-mobile). fw-yocto-layer moves `image_install` (#557) to `notes`. ## Tests - core: `only_code_exclusions_and_suppressions_are_informational`, `an_informational_entry_is_recorded_as_a_note`, `an_old_run_lists_its_informational_skips_as_notes`, `scan_runs_without_notes_deserialize_with_none` - agent: `evidence::tests::notes_leave_the_control_status_alone`, `evidence::tests::the_manifest_lists_the_last_runs_notes_apart_from_its_skips`, nightly `unit::exact_sets_report_both_directions_and_at_least_sets_only_losses` (now covers notes) - dashboard: `scan_runs::tests::an_old_runs_informational_skip_is_listed_as_a_note` 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 3 commits 2026-10-09 18:04:33 +00:00
A scan run gets a `notes` array for informational entries about stages
that ran (vendor code left out of SAST and the recipe lint, findings
suppressed by `# nooelint`). `skipped_stages` keeps the real skips and
failures. `SkipCode::is_informational` classifies each code; the agent
pushes an informational entry to `notes` with status `note`.

Runs recorded before keep their informational entries in
`skipped_stages`: the dashboard lists them under "Hinweise / Notes" via
`ScanRun::skips` / `ScanRun::all_notes`, and the API, MCP
get_scan_results and the evidence manifest split them on read
(`ScanRun::split_notes`). No stored data is migrated. Control status and
SBOM coverage read only the real skips. The nightly snapshot compares
notes separately; four baselines move `sast_vendor_code` to `notes`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
feat(scans): image install names not in the tree are a note
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 10m55s
e4b5e1fe83
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang force-pushed feat/scan-run-notes from 56cb388e61 to e4b5e1fe83 2026-10-09 18:04:33 +00:00 Compare
sharang merged commit 64f5a810dd into main 2026-10-09 18:21:29 +00:00
Sign in to join this conversation.