Repository navigation
fix(rules): apply max_findings after suppression and report dropped findings (#624) - #633
Merged
Merged
Conversation
…indings (#624) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
#624) Scanners now run uncapped (the cap is applied after suppression), so the prompt context keeps only the worst 20 findings per family and says how many are omitted, instead of growing with the diff. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
rules_engine.max_findingsis now enforced once, inengine::postprocess(newpostprocess_reportreturning{ issues, dropped };postprocesskept), AFTERignore.rulesandcora-ignore, on deterministic findings only (those with arule_id; LLM issues are never capped). Highest severity kept first, stable order.secrets,security, index scanners, rule engine) run uncapped (usize::MAX) fromdeterministic::run,postprocess(Files) andcora scan; theirmax_findingsparams are unchanged.cora scan/cora reviewprint one stderr line when findings are cut (⚠ N more deterministic findings not shown (rules.max_findings = 5; raise it or set 0/null to show all)); thecora scansummary mentions it.ReviewResponse.dropped_findingsis#[serde(skip)], so JSON/SARIF/compact stdout is unchanged.max_findings: 0ornull= unlimited (finding_cap());nullnow deserializes in.cora.yaml.docs/configuration.md) and CHANGELOG updated.Why
The cap was applied inside each scanner before suppression and truncated silently, so suppressed findings used up slots and hid real ones (5 marked lines hid the 6th real secret), with no message. Blocking is unaffected for any cap >= 1 because the most severe findings are kept first.
Testing
-D warnings, fullcargo test3x green.cora-ignored + 1 real -> real one reported, no warning;max_findings: 0-> all 9 shown;review --stagedcompact/json valid.Closes #624
🤖 Generated with Claude Code