Repository navigation
Gitleaks: allowlist synthetic secret fixtures, guard the allowlist - #2338
Merged
Merged
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>
remigiusz-antczak
marked this pull request as ready for review
November 13, 2026 10:57
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 #2337 and addresses its independent review.
A gitleaks scan of the last 200 commits reported 91 hits. Every hit is a synthetic credential that was planted on purpose in a secret-detector test fixture. That noise is why gitleaks can't yet be a required check.
.gitleaks.toml(new, at the repo root)secret-leaks.txt,secret-decoys.txtandledger.jsonlin eachdocs/bench/secrets-heldout*/directory;docs/bench/g1-matrix/heldout/*/result.json;RESULTS.md,score.pyandSHA256-frozen.txt.scripts/test_gitleaks_allowlist.sh(new, registered viascripts/ci-tests.d)aws-access-tokenRuleID in a fresh JSON report. This is checked with the repo config and, as a control, with the default config. A stale report is removed before each run, so an invalid config can't pass.Verification
scripts/test-ci-gates.sh: 303 pass, 8 fail, 2 skipped. The 8 failures are the known sandbox baseline.🤖 Generated with Claude Code