Skip to content

fix(rules): max_findings defaults to 50 and never hides critical/major findings - #660

Merged
ajianaz merged 2 commits into
developfrom
fix/max-findings-never-hide-serious
Oct 15, 2026
Merged

ajianaz merged 2 commits into
developfrom
fix/max-findings-never-hide-serious

Conversation

@ajianaz

@ajianaz ajianaz commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

What

  • rules_engine.max_findings default 5 → 50.
  • The cap never hides Critical or Major findings: it keeps all of them and fills the remaining slots with the most severe Minor/Info. not_shown / the stderr warning still report what was cut.
  • max_findings: 0 / null remains "no cap". Profiles keep their own values and get the same exemption.

Why

Measured on a real Rust codebase (uteke) with the cap off: uteke-cli has 915 deterministic findings of which 7 are Critical, so the old default showed 5 and hid 2 of the serious ones; uteke-core has 2404 (10 Critical, 88% bug-unwrap), so unlimited is not a usable default either. A capped list also reads as the full picture to users and agents (found while testing agent mode).

Testing

  • cargo fmt --check, cargo clippy --all-targets --features tree-sitter -- -D warnings, cargo test --features tree-sitter (1215 passed). Existing cap tests that capped critical secrets were rewritten for the new rule; new tests: serious findings exempt, remaining slots go to the most severe noise (Minor before Info), default 50.
  • Real runs on uteke with a real build: uteke-cli shows 50 (7 critical + 43 minor, 865 not shown), uteke-core shows 50 (10 critical + 40 minor, 2354 not shown).

ajianaz and others added 2 commits October 15, 2026 14:23
…r findings

The default cap of 5 hid serious findings (a module with 7 critical
findings showed 5). The cap now limits only Minor/Info noise: it keeps
every Critical and Major finding and fills the remaining slots with the
most severe noise, still reporting how many were not shown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
@ajianaz
ajianaz force-pushed the fix/max-findings-never-hide-serious branch from 867a3c7 to 2dc754b Compare October 15, 2026 07:25
@ajianaz
ajianaz merged commit 5dda80c into develop Oct 15, 2026
14 checks passed
@ajianaz
ajianaz deleted the fix/max-findings-never-hide-serious branch October 15, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant