run_plc_scan reads the ingested trees itself and never goes through scan_tree. So test data (#820) and excluded paths (#825) still reached the PLC control-logic analysis, the native-project check (#827) and the CODESYS SBOM. A git checkout is fetched again for the PLC pass, and that restores whatever the code pass removed.
What
Pruning: each PLC source tree goes through prune_left_out (configured paths first, then test data) before anything reads it. What was left out is noted on the run, exactly as for a code scan.
Closing stale findings: PLC findings are inserted directly, with no seen-set, so nothing ever closed them. The new RunFindings::resolve_left_out(db, target, scanner) closes the undecided findings of one scanner whose file lies in an excluded path (NowExcluded) or in test data (NowTestData), and nothing else. A finding the scan simply did not see again is not closed as fixed. Person-made decisions stay. Issues follow through IssueSync.
Docs:guide/plc.
Tests
Integration test only_what_was_left_out_is_closed_for_a_stage_without_a_seen_set (Mongo) covers:
excluded and test-data PLC findings close, each with its reason;
other PLC findings and other scanners' findings stay open;
Follow-up to #820 and #825.
## Why
`run_plc_scan` reads the ingested trees itself and never goes through `scan_tree`. So test data (#820) and excluded paths (#825) still reached the PLC control-logic analysis, the native-project check (#827) and the CODESYS SBOM. A git checkout is fetched again for the PLC pass, and that restores whatever the code pass removed.
## What
- **Pruning:** each PLC source tree goes through `prune_left_out` (configured paths first, then test data) before anything reads it. What was left out is noted on the run, exactly as for a code scan.
- **Closing stale findings:** PLC findings are inserted directly, with no seen-set, so nothing ever closed them. The new `RunFindings::resolve_left_out(db, target, scanner)` closes the undecided findings of one scanner whose file lies in an excluded path (`NowExcluded`) or in test data (`NowTestData`), and nothing else. A finding the scan simply did not see again is not closed as fixed. Person-made decisions stay. Issues follow through `IssueSync`.
- **Docs:** `guide/plc`.
## Tests
- Integration test `only_what_was_left_out_is_closed_for_a_stage_without_a_seen_set` (Mongo) covers:
- excluded and test-data PLC findings close, each with its reason;
- other PLC findings and other scanners' findings stay open;
- an accepted risk stays.
- CI only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
The PLC control-logic analysis reads the ingested trees itself, outside
the code scan's stages, so #820 (test data) and #825 (excluded paths)
did not reach it: fixtures and excluded paths in a PLC target were
still analysed.
- run_plc_scan prunes each source tree with prune_left_out before the
analysis, the native-project check and the SBOM, and notes what was
left out, as a code scan does.
- PLC findings are stored without a seen-set, so nothing used to close
them. RunFindings::resolve_left_out closes the undecided findings of
one scanner whose file lies in what was left out (NowExcluded,
NowTestData), and only those; their issues follow through issue sync.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
sharang
merged commit c16e91f981 into main2026-11-04 09:32:36 +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.
Follow-up to #820 and #825.
Why
run_plc_scanreads the ingested trees itself and never goes throughscan_tree. So test data (#820) and excluded paths (#825) still reached the PLC control-logic analysis, the native-project check (#827) and the CODESYS SBOM. A git checkout is fetched again for the PLC pass, and that restores whatever the code pass removed.What
prune_left_out(configured paths first, then test data) before anything reads it. What was left out is noted on the run, exactly as for a code scan.RunFindings::resolve_left_out(db, target, scanner)closes the undecided findings of one scanner whose file lies in an excluded path (NowExcluded) or in test data (NowTestData), and nothing else. A finding the scan simply did not see again is not closed as fixed. Person-made decisions stay. Issues follow throughIssueSync.guide/plc.Tests
only_what_was_left_out_is_closed_for_a_stage_without_a_seen_set(Mongo) covers:🤖 Generated with Claude Code