Repository navigation
ci: allowlist secret fixtures by value instead of commit - #77
Merged
Merged
Conversation
gitleaks fingerprints are pinned to a commit SHA, and CI scans every branch on the remote. Any rebase, squash-merge, or cherry-pick of a branch carrying a test fixture produced a new SHA and turned main red until another fingerprint was added. That happened on every merge of the #64 stack. Replace .gitleaksignore with a .gitleaks.toml that extends the default rules and allowlists the four synthetic fixture values by exact anchored regex. The allowlist follows the string, not the commit, so history rewrites stop mattering. Nothing else is exempt: a real secret in a test file is still reported, and a fresh PAT or JWT with a different value was verified to fail the scan under this config. Verified locally with gitleaks 8.30.1 against a clone with every remote ref fetched: 242 commits, no leaks, with the ignore file removed. Closes #60.
This was referenced Sep 3, 2026
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.
Why
gitleaks fingerprints in
.gitleaksignoreare pinned to a commit SHA, and CI checks out withfetch-depth: 0, so the scan covers every branch on the remote. Any rebase, squash-merge, or cherry-pick of a branch carrying a test fixture produces a new SHA and turnsmainred until another fingerprint lands. That happened on every merge in the #64 stack, and it is why #70 is red right now.What
Replace
.gitleaksignorewith a.gitleaks.tomlthat extends the default rules and allowlists the four synthetic fixture values by exact anchored regex:{"sub":"picklab"}placeholder JWT (packages/browser tests)ghp_0123…abcde(packages/cli telemetry test)api_key=abc123from the CLI secret-shape sweep (crates/pickforge-cli tests)The allowlist follows the string, not the commit. No rule and no path is exempted, so a real secret in a test file is still reported.
Verification
Local gitleaks 8.30.1 (same as CI) against a clone with every remote branch and PR head fetched, ignore file removed:
Closes #60.