Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Scans the full git history of a repository for leaked secrets, API keys, tokens, and credentials. Triggered when a user asks to audit commits for exposed credentials, run a pre-publish security check, or scan git history for sensitive data. Produces a severity-ranked findings table with remediation commands. Read-only — never modifies git history automatically.
.claude/skills/0xjitsu-secret-scanner/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✗→✓ | ▲ Improved | 23% | 0% |
| case-16 | ✗→✓ | ▲ Improved | 66% | 0% |
| case-17 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-22 | ✗→✓ | ▲ Improved | 90% | 0% |
| case-25 | ✗→✓ | ▲ Improved | 53% | 0% |
Scan the entire git history of a repository for leaked secrets, credentials, and sensitive tokens.
Do NOT scan only the working tree. Secrets may exist in deleted files or amended commits.
bash# Get all diffs across entire history (all branches, all commits) git log -p --all --diff-filter=ACMR --no-color
For targeted scanning of specific branches:
bashgit log -p <branch> --no-color
For scanning only added files (initial introductions of secrets):
bashgit log --all --diff-filter=A --name-only --pretty=format:"%H %ai"
Apply regex patterns against every + line (additions) in every diff hunk.
| Provider | Pattern | |-------------|----------------------------------------------------------------| | AWS Key ID | AKIA[0-9A-Z]{16} | | AWS Secret | aws_secret_access_key\s*[:=]\s*['"]?[A-Za-z0-9/+=]{40} | | GitHub PAT | ghp_[0-9a-zA-Z]{36} | | GitHub OAuth| gho_[0-9a-zA-Z]{36} | | GitHub Fine | github_pat_[0-9a-zA-Z_]{82} | | Stripe Live | sk_live_[0-9a-zA-Z]{24,} | | Stripe Restricted | rk_live_[0-9a-zA-Z]{24,} | | Private Key | -----BEGIN (RSA\|EC\|DSA )?PRIVATE KEY----- |
| Provider | Pattern | |-----------------|------------------------------------------------------------| | Sentry Auth | sntryu_[0-9a-f]{64} | | Slack Token | xox[bpors]-[0-9a-zA-Z-]{10,} | | Vercel Token | [A-Za-z0-9]{24} (in context of VERCEL_TOKEN or header)| | SendGrid | SG\.[0-9A-Za-z_-]{22}\.[0-9A-Za-z_-]{43} | | Twilio | SK[0-9a-fA-F]{32} | | Supabase Key | eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9\.[A-Za-z0-9_-]+ |
| Type | Pattern | |------------------|-----------------------------------------------------------| | Generic password | password\s*[:=]\s*['"][^'"]{8,}['"] | | Generic secret | secret\s*[:=]\s*['"][^'"]{8,}['"] | | Generic token | token\s*[:=]\s*['"][^'"]{16,}['"] | | Connection string| (mongodb\+srv\|postgres\|mysql):\/\/[^\s'"]+ | | Base64 blob | [A-Za-z0-9+/=]{40,} (contextual — only flag when near key/token/secret keywords) |
Present findings as a markdown table sorted by severity:
| # | Severity | Commit | Date | File | Pattern | Snippet (masked) |
|---|----------|------------|------------|-----------------------|-----------------|------------------|
| 1 | CRITICAL | a1b2c3d | 2025-03-15 | src/config.ts | AWS Key ID | AKIA****XXXX |
| 2 | CRITICAL | e4f5g6h | 2025-02-01 | .env | Stripe Live Key | sk_live_**** |
| 3 | HIGH | i7j8k9l | 2025-01-20 | lib/sentry.js | Sentry Auth | sntryu_**** |
| 4 | MEDIUM | m0n1o2p | 2024-12-10 | docker-compose.yml | Generic password| ******** |Always mask the middle portion of any found secret. Never display full credentials in output.
For each finding, provide:
CRITICAL: Rotate ALL found credentials immediately.
- AWS: IAM Console > Security Credentials > Create New Access Key > Deactivate Old
- GitHub: Settings > Developer Settings > Personal Access Tokens > Regenerate
- Stripe: Dashboard > Developers > API Keys > Roll Key
- Sentry: Settings > Auth Tokens > Revoke & Create NewUse git filter-repo (NOT git filter-branch which is deprecated):
bash# Install if needed pip install git-filter-repo # Remove a specific file from all history git filter-repo --invert-paths --path <file-path> # Replace a specific string across all history git filter-repo --replace-text <(echo 'AKIA1234567890ABCDEF==>REDACTED')
bash# WARNING: This rewrites shared history. Coordinate with all collaborators. git push --force --all git push --force --tags
Warn the user explicitly:
filter-repo — this rewrites ALL commit SHAsgit fetch --all && git reset --hard origin/<branch>Recommend adding a .gitignore entry and a pre-commit hook:
bash# .gitignore additions .env .env.local .env.*.local *.pem *.key # Pre-commit hook (save as .git/hooks/pre-commit) #!/bin/bash if git diff --cached | grep -qE 'AKIA|sk_live_|ghp_|-----BEGIN.*PRIVATE KEY'; then echo "ERROR: Potential secret detected in staged changes. Aborting commit." exit 1 fi
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 13,285 | 12,450 | -6% | 1 | 1 | 0% | 1,943 | 2,033 | +5% | 0 | 0 | — |
case-02 | fail→fail | 15,116 | 3,117 | -79% | 1 | 1 | 0% | 2,586 | 1,989 | -23% | 0 | 0 | — |
case-03 | fail→fail | 18,909 | 22,975 | +22% | 1 | 1 | 0% | 1,918 | 4,084 | +113% | 0 | 0 | — |
case-04 | pass→pass | 12,274 | 19,933 | +62% | 1 | 1 | 0% | 1,616 | 2,581 | +60% | 0 | 0 | — |
case-05 | pass→pass | 17,619 | 9,472 | -46% | 1 | 1 | 0% | 2,205 | 3,394 | +54% | 0 | 0 | — |
case-06 | pass→pass | 9,823 | 9,500 | -3% | 1 | 1 | 0% | 1,727 | 3,322 | +92% | 0 | 0 | — |
case-07 | pass→pass | 5,404 | 3,722 | -31% | 1 | 1 | 0% | 995 | 2,385 | +140% | 0 | 0 | — |
case-08 | pass→pass | 11,305 | 4,236 | -63% | 1 | 1 | 0% | 2,031 | 2,522 | +24% | 0 | 0 | — |
case-09 | fail→fail | 7,419 | 7,223 | -3% | 1 | 1 | 0% | 1,136 | 2,868 | +152% | 0 | 0 | — |
case-10 | pass→pass | 10,953 | 5,406 | -51% | 1 | 1 | 0% | 1,747 | 2,609 | +49% | 0 | 0 | — |
case-11 | pass→pass | 9,338 | 4,963 | -47% | 1 | 1 | 0% | 1,725 | 2,656 | +54% | 0 | 0 | — |
case-12 | pass→pass | 10,634 | 5,254 | -51% | 1 | 1 | 0% | 1,804 | 2,634 | +46% | 0 | 0 | — |
case-13 | pass→pass | 8,308 | 4,512 | -46% | 1 | 1 | 0% | 1,537 | 2,545 | +66% | 0 | 0 | — |
case-14 | pass→pass | 8,687 | 5,005 | -42% | 1 | 1 | 0% | 1,683 | 2,645 | +57% | 0 | 0 | — |
case-15 | fail→pass | 10,089 | 3,929 | -61% | 1 | 1 | 0% | 1,729 | 2,134 | +23% | 0 | 0 | — |
case-16 | fail→pass | 11,131 | 7,954 | -29% | 1 | 1 | 0% | 1,905 | 3,166 | +66% | 0 | 0 | — |
case-17 | fail→pass | 9,853 | 3,159 | -68% | 1 | 1 | 0% | 1,707 | 2,368 | +39% | 0 | 0 | — |
case-18 | pass→pass | 9,688 | 8,195 | -15% | 1 | 1 | 0% | 1,764 | 2,871 | +63% | 0 | 0 | — |
case-19 | pass→pass | 5,697 | 6,020 | +6% | 1 | 1 | 0% | 846 | 2,587 | +206% | 0 | 0 | — |
case-20 | pass→pass | 8,840 | 6,038 | -32% | 1 | 1 | 0% | 1,631 | 2,802 | +72% | 0 | 0 | — |
case-21 | pass→pass | 5,338 | 4,600 | -14% | 1 | 1 | 0% | 1,024 | 2,493 | +143% | 0 | 0 | — |
case-22 | fail→pass | 10,814 | 9,630 | -11% | 1 | 1 | 0% | 1,785 | 3,398 | +90% | 0 | 0 | — |
case-23 | pass→pass | 11,992 | 10,540 | -12% | 1 | 1 | 0% | 2,130 | 3,629 | +70% | 0 | 0 | — |
case-24 | pass→pass | 14,395 | 12,313 | -14% | 1 | 1 | 0% | 2,510 | 4,406 | +76% | 0 | 0 | — |
case-25 | fail→pass | 12,336 | 8,728 | -29% | 1 | 1 | 0% | 2,003 | 3,071 | +53% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +20 percentage points is the difference between those two pass rates over the 25 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.