secrets-scanner
Skill3 starsChanged 11 months agoApache-2.0View on GitHub
Scan code for exposed secrets and credentials. Use when the user needs to find leaked API keys, passwords, or sensitive data in repositories.
- Reads credentials
- Deletes or force-pushes
- Installs packages
- Commits and pushes
2 other projects use a version of this.
Adopted by
Most recently taken up by
- codebygarv/Ai-skillstheir own version, first seen Aug 16, 2026
- roodlicht/accans-sec-skillstheir own version, first seen May 7, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- codebygarv/Ai-skills★ 26same name
- roodlicht/accans-sec-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository100 other files it gives its agents.
- accessibility-checkerSkill
- analytics-trackerSkill
- api-contract-testerSkill
- api-documentation-generatorSkill
- api-rate-limiterSkill
- appstore-screenshot-resizerSkill
- architecture-documenterSkill
- authentication-implementerSkill
- aws-resource-provisionerSkill
- browser-extension-builderSkill
- caching-implementerSkill
- changelog-generatorSkill
- chart-generatorSkill
- ci-pipeline-debuggerSkill
- cli-tool-builderSkill
- code-documenterSkill
- code-explainerSkill
- code-migration-helperSkill
- code-refactorerSkill
- code-reviewerSkill
- color-palette-generatorSkill
- comment-generatorSkill
- contributing-guide-writerSkill
- cron-job-schedulerSkill
- css-animatorSkill
- csv-processorSkill
- data-aggregatorSkill
- database-backup-restoreSkill
- database-migration-generatorSkill
- database-query-optimizerSkill
- data-transformerSkill
- data-validatorSkill
- date-time-helperSkill
- debug-helperSkill
- dependency-updaterSkill
- dependency-vulnerability-checkerSkill
- discord-bot-builderSkill
- docker-compose-builderSkill
- dockerfile-generatorSkill
- e2e-test-builderSkill
- email-template-builderSkill
- env-setupSkill
- error-handlerSkill
- error-message-writerSkill
- error-response-handlerSkill
- etl-pipeline-builderSkill
- file-organizerSkill
- form-builderSkill
- git-commit-messageSkill
- github-actions-builderSkill
- gitignore-generatorSkill
- graphql-schema-builderSkill
- icon-system-builderSkill
- input-validatorSkill
- integration-test-builderSkill
- jsdoc-generatorSkill
- json-schema-generatorSkill
- kubernetes-manifest-generatorSkill
- license-chooserSkill
- linter-fixerSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 68
Remove from history: - Use BFG or git-filter-repo
- Distinctive: line 70
Update references: - Update all systems using the old secret
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Secrets Scanner
Detect exposed secrets and credentials in code.
Common Secret Patterns
| Type | Pattern Example |
| AWS Key | AKIA[0-9A-Z]{16} |
| GitHub Token | ghp_[a-zA-Z0-9]{36} |
| Slack Token | xox[baprs]-[0-9a-zA-Z]{10,} |
| Private Key | -----BEGIN RSA PRIVATE KEY----- |
| Generic API Key | api[_-]?key.*['\"][0-9a-zA-Z]{16,} |
Using Gitleaks
# Install
brew install gitleaks
# Scan repository
gitleaks detect --source . --verbose
# Scan with baseline (ignore known issues)
gitleaks detect --baseline-path .gitleaks-baseline.json
# Pre-commit hook
gitleaks protect --stagedCustom Regex Patterns
# .gitleaks.toml
[[rules]]
id = "custom-api-key"
description = "Custom API Key"
regex = '''(?i)my_service_api_key\s*[=:]\s*['"]([a-zA-Z0-9]{32})['"]'''
tags = ["api", "custom"]
[[rules]]
id = "internal-secret"
description = "Internal Service Secret"
regex = '''INTERNAL_SECRET_[A-Z]+\s*=\s*['"](.+)['"]'''Git History Scan
# Scan entire history
gitleaks detect --source . --log-opts="--all"
# Search specific commits
git log -p --all -S 'API_KEY' -- '*.js'
# Find secrets in specific file history
git log -p --follow -- config.js | grep -i "password\|secret\|key"Remediation Steps
- Revoke the secret - Immediately invalidate the exposed credential
- Remove from history - Use BFG or git-filter-repo
- Rotate credentials - Generate new secrets
- Update references - Update all systems using the old secret
- Add prevention - Set up pre-commit hooks
Remove from Git History
# Using BFG
bfg --replace-text passwords.txt
# Using git-filter-repo
git filter-repo --invert-paths --path secrets.txt
# Force push (coordinate with team!)
git push --forcePre-commit Hook
# .pre-commit-config.yaml
repos:
- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.0
hooks:
- id: gitleaksPrevention Checklist
- Use environment variables for secrets
- Add .env to .gitignore
- Set up pre-commit scanning
- Enable secret scanning in GitHub
- Review CI/CD for exposed secrets
- Audit third-party integrations
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

