Repository navigation
Narrow gitleaks allowlist to fixture values; harden the allowlist guard - #2341
Closed
remigiusz-antczak wants to merge 2 commits into
Closed
remigiusz-antczak wants to merge 2 commits into
remigiusz-antczak wants to merge 2 commits into
Conversation
A root .gitleaks.toml extends the default rules and allowlists only the synthetic secret-detector fixture files by anchored path regex (the secret-leaks, secret-decoys and ledger files, the g1-matrix heldout result files and two secret test scripts), taking the history scan from 91 hits to 0. Sibling files in those dirs stay scanned. scripts/test_gitleaks_allowlist.sh requires an aws-access-token finding for a fake key outside the allowlist, with the repo config and with the default config as a control, and a clean scan of the fixture paths. It skips when gitleaks is absent. Tests: 303/311 (sandbox baseline unchanged; new guard passes) No-Mechanism-Reason: config and test only, no skill prose changed Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y hits .gitleaks.toml exempts only the fictional fixture values in the two secret test scripts instead of whole files; its comment states the value regexes apply repo-wide. .gitleaksignore lists the fingerprints of the 19 remaining history hits, all triaged as fictional, so a history scan reports 0 findings. test_gitleaks_allowlist.sh asserts the 0-finding history scan (skipped on shallow checkouts), counts a probe as detected only on exit 1 plus an aws-access-token report (any other exit fails), and fails when gitleaks is missing under CI or REQUIRE_GITLEAKS=1. Tests: test_gitleaks_allowlist 1/1 (rc 0); gitleaks history scan 0 findings Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This was referenced Nov 13, 2026
remigiusz-antczak
marked this pull request as ready for review
November 13, 2026 10:57
This was referenced Nov 13, 2026
Collaborator
Author
|
Superseded by a single-commit recut on current main. |
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.
Supersedes #2340 and adds the three review fixes.
.gitleaks.toml: the two whole-file test-script path entries become value regexes, so a real key added to either script is still caught. The comment now says these value regexes apply repo-wide..gitleaksignore: 19 fingerprints. Each one is a triaged, fictional history hit underdocs/bench.scripts/test_gitleaks_allowlist.sh:scan_relnow counts a finding only when gitleaks exits 1 and its report holds anaws-access-tokenresult. Any other exit code fails the test.CIorREQUIRE_GITLEAKS=1is set.Verified locally:
bash scripts/test_gitleaks_allowlist.shprints PASS.gitleaks git --log-opts=HEAD -c .gitleaks.toml --gitleaks-ignore-path .gitleaksignoreprints "no leaks found".Stacked on #2338. Retarget to
mainonce #2338 merges.🤖 Generated with Claude Code