Skip to content

fix(review): static scan says which analyzers ran and which were not installed - #531

Merged
dan-petty merged 1 commit into
release/v0.2.23from
fix/516-missing-scanners
Sep 24, 2026
Merged

dan-petty merged 1 commit into
release/v0.2.23from
fix/516-missing-scanners

Conversation

@dan-petty

Copy link
Copy Markdown
Owner

Closes #516.

Problem

A review printed "Static analyzers completed (0 finding(s) detected)" after naming six analyzers, when only Bandit was installed:

  • Semgrep, Trivy, Kube-linter and Pluto were skipped silently;
  • Gitleaks fell back to its built-in patterns.

A reader took that for a clean scan.

Changes

  • State per analyzer (_static_analyzer_states in pipeline.py). Each of the six analyzers is recorded with one of four states:
    • ran;
    • built-in patterns (Gitleaks without its binary);
    • not installed;
    • no files of its kind.
  • Console:
    • the analyzers that ran, and what they found;
    • on its own line, the analyzers not installed;
    • an explicit line when none ran.
  • Session report: review.md has a Static Analyzers table.
  • Benchmarks:
    • profile.json records the states;
    • BenchmarkSummary.static_analyzers keeps every state each analyzer had across runs;
    • devops review benchmark prints them, so runs that differ are visible.
  • Gitleaks' binary comes from BIN_GITLEAKS, like the other scanners.

On this devcontainer (Bandit only, as in the report):

    ✓ Static analyzers found 0 finding(s): Bandit, Gitleaks (built-in patterns) ran
    ! Not installed, so not run: Kube-linter, Pluto, Trivy, Semgrep

Also found

stages/static_scan.py still prints the old message and never calls Trivy. It is one of six run_*_stage entry points the pipeline never calls. They are filed for removal as #530, not changed here.

Test plan

  • tests/test_review_static_analyzers.py (6 tests):
    • states on a Bandit-only host;
    • the console lines, including when nothing ran;
    • the reported case end to end (console, orchestrator state, profile);
    • the report table;
    • profile round trip, benchmark merge and benchmark output.
  • uv run devops ci --force: all 13 gates pass

…installed

A review printed "Static analyzers completed (0 finding(s) detected)" after naming six
analyzers when only Bandit was installed. Semgrep, Trivy, kube-linter and Pluto were
skipped silently and Gitleaks fell back to its built-in patterns, so the scan read as
clean.

Each analyzer is now recorded as ran, built-in patterns, not installed or no files:
- the console names the analyzers that ran, and on its own line those not installed;
- review.md has a Static Analyzers table;
- profile.json and benchmark summaries keep the states, so benchmarks tell a clean
  scan from a skipped one.

Gitleaks' binary comes from BIN_GITLEAKS like the other scanners. The unused stage
module that still prints the old message is filed as #530.

Closes #516
@dan-petty dan-petty added this to the v0.2.23 milestone Sep 24, 2026
@dan-petty dan-petty added type/bug Type bug: the code does not do what it must scope/review Multi-persona code review engine, verification, and findings priority/p2-medium Priority P2: standard work labels Sep 24, 2026
@dan-petty
dan-petty merged commit b159e3b into release/v0.2.23 Sep 24, 2026
7 checks passed
@dan-petty
dan-petty deleted the fix/516-missing-scanners branch September 24, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority/p2-medium Priority P2: standard work scope/review Multi-persona code review engine, verification, and findings type/bug Type bug: the code does not do what it must

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant