feat(findings): a scan closes what it no longer finds and reopens what returns
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 7m31s
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 7m31s
Until now a finding stayed open forever once stored: fixing the code changed nothing, and moved code left a duplicate behind. At the end of a code scan (after write_back, so a failed run closes nothing), RunFindings::resolve_missing sets Resolved on the target's findings that a scanner which completed in this run stored earlier but did not report again, if nobody decided about them yet (open, triaged, needs_review). A finding whose file now lies in vendor code is closed with that reason instead. save_new reopens a Resolved finding that a completed scanner reports again. Only scanners whose completion is known count: semgrep, cppcheck, gitleaks and the GDPR/OAuth patterns. Lint (a linter can fail inside a stage that succeeds) and the LLM checks (not repeatable) close nothing; manual and imported findings are never a scan's; PLC targets are not covered yet. Every such change is in the status history as a StatusChange with `by = "pruefwerk-scan"` and a `scan` entry (kind, run id); the dashboard shows "Prüfwerk-Scan" and the reason in German or English. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
This commit is contained in:
1 parent
9b85d5148e
commit
2734e361cc
9 files changed
+472
-18
No files matched your search
+34
-3
@@ -108,7 +108,7 @@ under **Status ändern**; the change takes effect at once.
|
||||
| **Offen** (Open) | New, not yet decided. |
|
||||
| **Zu prüfen** (Needs review) | The automated review doubts the finding: the AI triage dismissed it or was not confident, or the control check did not confirm the CRA requirements it was mapped to. It stays in the list until a person decides; no finding is ever hidden automatically. |
|
||||
| **Bewertet** (Triaged) | Reviewed and confirmed as a real issue, still to be fixed. The AI triage also sets this when it confirms a finding. |
|
||||
| **Behoben** (Resolved) | Fixed. |
|
||||
| **Behoben** (Resolved) | Fixed. A scan also sets it when it no longer finds the issue (see [Closed by the scan](#closed-and-reopened-by-the-scan)). |
|
||||
| **Fehlalarm – Regel** (False positive – rule) | The rule fired on code that is not a problem. The finding is not real. |
|
||||
| **Fehlalarm – Zuordnung** (False positive – mapping) | The finding may be real, but it does not violate the CRA requirement it was mapped to. **Needs a reason.** The finding keeps its CRA references, so it stays on record which mapping was wrong. |
|
||||
| **Risiko akzeptiert** (Accepted risk) | Known and deliberately not fixed, e.g. because the device runs only on an isolated network. **Needs a reason.** |
|
||||
@@ -137,6 +137,36 @@ under **Status ändern**; the change takes effect at once.
|
||||
Every status change, with or without a reason, is added to the finding's
|
||||
**Verlauf** (history): the status, who set it, when, and the reason.
|
||||
|
||||
### Closed and reopened by the scan
|
||||
|
||||
When a scan completes, it sets **Behoben** on every finding it reported
|
||||
earlier but no longer finds, as long as nobody has decided about it yet
|
||||
(**Offen**, **Bewertet** or **Zu prüfen**). The **Verlauf** shows
|
||||
*Prüfwerk-Scan* and why:
|
||||
|
||||
- *Bei der Prüfung nicht mehr gefunden* -- the code was changed or removed.
|
||||
- *Liegt jetzt in Herstellercode* -- the file now counts as vendor code, which
|
||||
is left out of the findings.
|
||||
|
||||
A finding marked **Behoben** (by you or by the scan) that a later scan finds
|
||||
again goes back to **Offen** (*Bei der Prüfung erneut gefunden*).
|
||||
|
||||
What the scan never changes:
|
||||
|
||||
- **Fehlalarm**, **Risiko akzeptiert** and **Ignoriert**: those are your
|
||||
decisions.
|
||||
- Findings you entered or imported by hand (penetration test, DAST).
|
||||
- Findings of a tool that did not complete in that scan (it is listed under
|
||||
**Nicht ausgeführt**): a failed analysis says nothing about the code.
|
||||
- Findings of the linters and of the AI checks, and of SPS/PLC projects (not
|
||||
yet).
|
||||
- A scheduled scan that finds no new commits does not scan, so it closes
|
||||
nothing.
|
||||
|
||||
Findings are tied to a file and line. When code moves (lines added above it),
|
||||
the same issue is reported at its new line as a new finding, and the old one
|
||||
is closed as no longer found.
|
||||
|
||||
### Recommended Flow
|
||||
|
||||
1. A scan finds something new. It starts as **Offen**, or as **Bewertet** or
|
||||
@@ -144,8 +174,9 @@ Every status change, with or without a reason, is added to the finding's
|
||||
2. Read the **Einschätzung** and the **Code**.
|
||||
3. Decide: **Bewertet** if it needs fixing, one of the two false-alarm statuses
|
||||
if it does not apply, **Risiko akzeptiert** if you will not fix it.
|
||||
4. After the fix, set **Behoben**. A later scan does not change the status of a
|
||||
finding it already knows, and does not close a finding on its own.
|
||||
4. After the fix, scan again: the scan sets **Behoben** when the issue is gone.
|
||||
You can also set it yourself; if a later scan finds the issue again, it is
|
||||
reopened.
|
||||
|
||||
## Human in the Loop
|
||||
|
||||
|
||||
Reference in new issue
Block a user