fix(scan): skipped stages name a file or tool, never a server path #413

Merged
sharang merged 1 commits from fix/skipped-stage-codes into main 2026-09-26 10:41:35 +00:00
Owner

Closes #409.

A scan run listed its skipped stages with the reason the agent recorded, verbatim. That meant raw error text with storage paths and internal ids, in English, on the German UI, for example "… source not found at /data/compliance-scanner/artifacts/uploads/…".

Change

  • Core: SkippedStage gains two fields:

    • code: a SkipCode, one of feature_disabled, submodules_not_fetched, vendor_code, tool_failed, dependencies_unlocked, not_analysed_yet, archive_unreadable, artifact_not_ingested, archive_password_required, archive_password_wrong, firmware_sbom_failed, firmware_build_unknown, firmware_unresolved, cve_lookup_incomplete.
    • subject: what it concerns, safe to show (a file, a tool, directories, components).

    Both are serde(default), so runs recorded before this change still load.

  • Agent:

    • skip_stage takes a built SkippedStage, so every call site says which code applies.
    • Raw errors from semgrep, cppcheck, OSV, the PLC archive reader, ingest and firmware analysis go to the log only. The stored English reason is a plain sentence.
    • IngestFailure::skipped() names the artifact, never its storage path.
    • The firmware SBOM returns its gap as a typed skipped stage, with its own code for "no supported build system".
  • Dashboard:

    • scans::skipped_reason words each code in German or English, with its subject. A run recorded before codes existed shows its stored reason.
    • The password hints now point to "Bearbeiten" on the target's page (#408 moved it there).
  • Unchanged: stage ids, so the nightly baselines (which compare stage ids) hold.

Checks

  • fmt, and clippy with the CI flags on core, agent, MCP and both dashboard feature sets.
  • Tests: core 75, agent lib 454, dashboard 43 + 59.
  • New tests:
    • old runs without a code still deserialize;
    • an ingest failure names only the file, and its reason holds no path;
    • "no supported build system" gets its own code;
    • German and English wording, including the fallback for old runs.

Seen, not changed

error_message on a failed run is still the raw error. That's a different field and a separate change.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p

Closes #409. A scan run listed its skipped stages with the reason the agent recorded, verbatim. That meant raw error text with storage paths and internal ids, in English, on the German UI, for example *"… source not found at /data/compliance-scanner/artifacts/uploads/…"*. ## Change - **Core:** `SkippedStage` gains two fields: - `code`: a `SkipCode`, one of feature_disabled, submodules_not_fetched, vendor_code, tool_failed, dependencies_unlocked, not_analysed_yet, archive_unreadable, artifact_not_ingested, archive_password_required, archive_password_wrong, firmware_sbom_failed, firmware_build_unknown, firmware_unresolved, cve_lookup_incomplete. - `subject`: what it concerns, safe to show (a file, a tool, directories, components). Both are `serde(default)`, so runs recorded before this change still load. - **Agent:** - `skip_stage` takes a built `SkippedStage`, so every call site says which code applies. - Raw errors from semgrep, cppcheck, OSV, the PLC archive reader, ingest and firmware analysis go to the log only. The stored English `reason` is a plain sentence. - `IngestFailure::skipped()` names the artifact, never its storage path. - The firmware SBOM returns its gap as a typed skipped stage, with its own code for "no supported build system". - **Dashboard:** - `scans::skipped_reason` words each code in German or English, with its subject. A run recorded before codes existed shows its stored reason. - The password hints now point to "Bearbeiten" on the target's page (#408 moved it there). - **Unchanged:** stage ids, so the nightly baselines (which compare stage ids) hold. ## Checks - fmt, and clippy with the CI flags on core, agent, MCP and both dashboard feature sets. - Tests: core 75, agent lib 454, dashboard 43 + 59. - New tests: - old runs without a code still deserialize; - an ingest failure names only the file, and its reason holds no path; - "no supported build system" gets its own code; - German and English wording, including the fallback for old runs. ## Seen, not changed `error_message` on a failed run is still the raw error. That's a different field and a separate change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang added 1 commit 2026-09-26 10:06:59 +00:00
fix(scan): skipped stages name a file or tool, never a server path
CI / Check (push) Skipped
CI / Check (pull_request) Successful in 7m10s
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
45cc60ce2b
A scan run listed its skipped stages with the reason the agent recorded,
raw: error text with storage paths and internal ids, in English, on the
German UI ("… source not found at /data/compliance-scanner/artifacts/…").

A skipped stage now carries a stable code and a subject that is safe to
show (a file, a tool, directories, components); the dashboard words the
code in German or English. Raw errors (semgrep, cppcheck, OSV, PLC archive,
ingest, firmware analysis) go to the log only, and the stored English
reason is a plain sentence. The firmware SBOM reports its gap as a typed
skipped stage, with its own code for "no supported build system". Runs
recorded before codes existed still read and show their stored reason.
Stage ids are unchanged, so the nightly baselines hold.

Closes #409.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
sharang merged commit e09c0d0a9d into main 2026-09-26 10:41:35 +00:00
Sign in to join this conversation.