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