chore(ci): list both fingerprint forms so .gitleaksignore works on any gitleaks - #21
Merged
Merged
Conversation
…y gitleaks `make validate` failed on the developer machine and passed in CI, for nine findings this file already documents: FAIL gitleaks (full history) leaks found: 9 A gitleaks fingerprint is `<commit>:<path>:<rule>:<line>`, matched as a literal string. Up to and including v8.25 the commit is the full 40-char SHA; from v8.26 it is the 7-char short form. Path, rule and line are byte-identical across the change — only the SHA length moved: in this file (written by 8.24.0) ee3d443:…:4 emitted by a local 8.30.1 ee3d443:…:4 CI pins zricethezav/gitleaks:v8.24.0 while `brew install gitleaks` is years ahead of that, so one form can only ever satisfy one of the two. That is the precise failure this file was written to prevent. Its own header says a scan "that is red for a known reason gets ignored, and then a *new* leak goes unnoticed too" — and a permanently red `make validate` trains exactly that habit, on the machine where the developer is most likely to introduce a leak. List both forms. An entry matching no finding is inert, so the full-SHA lines stay correct for CI and the short-SHA lines cover anything 8.26+. This also removes the need to touch the file again the next time the format moves; a third form can just be appended. Not pinned locally instead, because that fixes one machine and a `brew upgrade` silently undoes it. Not regenerated for 8.26+, because that would invert the problem and break CI. Verified with the local 8.30.1: `gitleaks --log-opts=--all` reports 0, and `./scripts/validate.sh` reports `all checks passed`. Confirmed still able to catch a new leak — a decoy private key dropped in the working tree is detected, so the additions are not over-broad. The full-SHA half is exercised by CI on this PR. After the history purge this whole file goes away and the duplication with it. Co-Authored-By: Claude Opus 5 <[email protected]>
Gerrrt
added a commit
that referenced
this pull request
Aug 19, 2026
chore(ci): list both fingerprint forms so .gitleaksignore works on any gitleaks
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.
make validatefailed on the developer machine and passed in CI, for ninefindings this file already documents:
Cause
A gitleaks fingerprint is
<commit>:<path>:<rule>:<line>, matched as a literalstring. Up to v8.25 the commit is the full 40-char SHA; from v8.26 it is the
7-char short form. Path, rule and line are byte-identical across the change —
only the SHA length moved:
CI pins
zricethezav/gitleaks:v8.24.0;brew install gitleaksis years ahead ofthat. One form can only ever satisfy one of the two.
Why it matters
This is the precise failure the file exists to prevent. Its own header says a
scan "that is red for a known reason gets ignored, and then a new leak goes
unnoticed too" — and a permanently red
make validatetrains exactly thathabit, on the machine where a developer is most likely to introduce a leak.
Fix
List both forms. An entry matching no finding is inert, so the full-SHA lines
stay correct for CI and the short-SHA lines cover 8.26+. A third form can be
appended if the format moves again.
Rejected alternatives: pinning gitleaks locally fixes one machine and a
brew upgradesilently undoes it; regenerating for 8.26+ inverts the problem andbreaks CI.
Verification
With the local 8.30.1:
gitleaks detect --log-opts=--all→ 0 findings./scripts/validate.sh→all checks passeddetected, so the additions suppress only the nine known findings
The full-SHA half is exercised by CI on this PR — a green Secret scan here is
what confirms v8.24.0 is unaffected.
After the history purge (
docs/runbooks/purge-git-history.md) this file goesaway and the duplication with it.
🤖 Generated with Claude Code