Repository navigation
fix(rules): stop flagging Token::default() and show only reportable findings in review_prepare - #703
Merged
Conversation
…indings in review_prepare (#697) Signed-off-by: ajianaz <ajianaz@users.noreply.github.com>
ajianaz
force-pushed
the
fix/697-secret-type-name-and-prepare-ignore
branch
from
October 27, 2026 07:23
cc46f2f to
9008faa
Compare
ajianaz
added a commit
that referenced
this pull request
Oct 27, 2026
…indings in review_prepare (#703) ## What - `crypto/hardcoded-secret`: the value after a single `:` can no longer start with another `:`, so `CancelToken::default()`, `Token::from_parts(..)` and `ApiKey::generate_random()` (paths) are not read as `token: <value>`. Real cases (`password = "..."`, `token: "..."`, JSON `api_key`) are still flagged. - `cora.review_prepare` runs the same post-processing as `review_finalize` on `deterministic_findings` (`ignore.rules`, inline `cora-ignore` markers, context filter), without the findings cap (the note still explains it), so the agent no longer sees and fixes a finding that finalize would drop. ## Why A project had to silence the rule by title, which hid real secrets too, and an agent changed code to avoid a finding the repository already ignored (#697). ## Testing - Regression test for type paths versus real secrets in the scanner. - Test that an ignored finding is not listed by prepare. - fmt, clippy -D warnings and the full suite pass. Closes #697. Signed-off-by: ajianaz <ajianaz@users.noreply.github.com> Co-authored-by: ajianaz <ajianaz@users.noreply.github.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
crypto/hardcoded-secret: the value after a single:can no longer start with another:, soCancelToken::default(),Token::from_parts(..)andApiKey::generate_random()(paths) are not read astoken: <value>. Real cases (password = "...",token: "...", JSONapi_key) are still flagged.cora.review_prepareruns the same post-processing asreview_finalizeondeterministic_findings(ignore.rules, inlinecora-ignoremarkers, context filter), without the findings cap (the note still explains it), so the agent no longer sees and fixes a finding that finalize would drop.Why
A project had to silence the rule by title, which hid real secrets too, and an agent changed code to avoid a finding the repository already ignored (#697).
Testing
Closes #697.