Skip to content

chore: add gitleaks config + allowlist#166

Merged
KailasMahavarkar merged 1 commit intomainfrom
chore/gitleaks-config
Apr 20, 2026
Merged

chore: add gitleaks config + allowlist#166
KailasMahavarkar merged 1 commit intomainfrom
chore/gitleaks-config

Conversation

@KailasMahavarkar
Copy link
Copy Markdown
Contributor

Ran gitleaks on full history (742 commits). 17 hits, all resolved.

Real leak (1 key across 2 paths)

sk-or-v1-f5a29580... in tools/finetune/training_config.json (commit 5c54c9c) and its old path benchmarks/finetune/training_config.json (commit a654ac3). Already revoked at openrouter.ai. History rewrite skipped deliberately (force-push to main breaks existing clones; key is dead).

False positives (15 hits)

Wikipedia HTML dumps under tests/fixtures/html/*.html bundle wgConfirmEditHCaptchaSiteKey = 5d0c670e-.... hCaptcha site keys are public by design (every browser that loads Wikipedia sees them). Gitleaks flags high entropy but they aren't secret.

Config

.gitleaks.toml adds allowlist entries for:

  • HTML fixture paths (tests/fixtures/html/*.html)
  • The revoked key value (so future scans stay quiet instead of repeating the noise)

Test

gitleaks detect --source . --config .gitleaks.toml --no-banner
# INF no leaks found

Follow-up (optional)

  • Add gitleaks as a pre-commit hook or CI job
  • Add secret scanning to the .github/workflows/ci.yml test job

🤖 Generated with Claude Code

Installed gitleaks + did full history scan (742 commits). 17 hits
resolved into:

* 2 hits (commits 5c54c9c and a654ac3): the OpenRouter key
  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.
  Already revoked at openrouter.ai. History rewrite skipped deliberately
  (force-push main would break existing clones, and the key is dead).

* 15 hits: Wikipedia HTML fixture dumps under tests/fixtures/html/*.html
  bundle wgConfirmEditHCaptchaSiteKey = 5d0c670e-a5f4-4258-ad16-...
  hCaptcha site keys are PUBLIC by design (served to every browser that
  loads Wikipedia). Gitleaks flags them as high-entropy but they are
  not secret.

Added .gitleaks.toml with:
  - allowlist.paths: the HTML fixtures directory
  - allowlist.regexes: the specific revoked OpenRouter key

Result after re-scan: 0 leaks. Future scans stay quiet.

Run:  gitleaks detect --source . --config .gitleaks.toml --no-banner
Or in CI as a pre-push / pre-commit hook.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@KailasMahavarkar KailasMahavarkar merged commit 6b907b1 into main Apr 20, 2026
4 checks passed
@KailasMahavarkar KailasMahavarkar deleted the chore/gitleaks-config branch April 20, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant