Make the scanner say WHAT it found - #2
Merged
Conversation
The first version reported a count and nothing else. It now prints rule, file, line, commit and entropy (values still redacted), uploads the JSON report, and says what to do in both directions -- rotate a real credential, or allowlist a false positive by the narrowest mechanism the tool actually honours. Co-Authored-By: Claude Opus 5 (1M context) <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.
Follow-up to the scanner added earlier today. The first version reported
leaks found: 1and nothing else — no file, no line, no commit. That is a real defect: it sends you hunting through the whole history to find what it means.It now reports what it found — rule, file, line, commit, date, entropy, values still redacted — and uploads the JSON report as an artifact.
It also tells you what to do next, in both directions: rotate a real credential (rewriting history does not make a leaked key safe — the object stays retrievable by hash), or allowlist a false positive by the narrowest mechanism the tool honours, never a path, extension or whole rule.
One trap learned the hard way and written into the guidance: gitleaks 8.18 accepts a
fingerprintskey in the global allowlist, loads the config without complaint, and then ignores it. Anyone assuming fingerprints work would believe something was suppressed when it was not.🤖 Generated with Claude Code