| name | github-secret-hunting |
| description | Find leaked API keys, tokens, and credentials in public GitHub repositories. |
| version | 1.1.0 |
| revision_date | "2026-07-25T00:00:00.000Z" |
| license | MIT |
| platforms | ["linux"] |
| compatibility | Requires curl, httpx, python3 |
| tags | ["recon","github","secret","API-key","token","dork","OSINT","trufflehog","credential"] |
| category | recon |
| related_skills | ["js-secrets-extraction","hardcoded-credential-hunt","source-leak-hunt"] |
GitHub Secret Hunting
Scan public GitHub repositories for leaked API keys, tokens, passwords, and internal infrastructure details. Developers accidentally push secrets constantly — this skill uses targeted dorking, automated scanning tools, and real-time monitoring to find credentials before the developer notices and revokes them.
When to Use
- Target has public repositories under an organization account.
- JS bundle analysis reveals internal service names — search GitHub for related config files.
- Need to find valid API keys for cloud services, payment gateways, or third-party integrations.
- The target uses CI/CD systems that may leak tokens in build logs or workflow files.
- Want real-time monitoring for new secret leaks from the target org.
Prerequisites
terminal with python3, curl, git.
- GitHub Personal Access Token (only
public_repo scope needed).
- Tool dependencies: TruffleHog, GitDorker, gitleaks.
Quick Detection
echo "target.com" | while read domain; do
curl --max-time 30 --connect-timeout 10 -s -H "Authorization: token $GITHUB_TOKEN" \
"https://api.github.com/search/code?q=$domain+filename:.env" \
| jq '.items[]?.html_url'
done
Procedure
Phase 1 — Targeted Dorking with GitDorker
git clone https://github.com/Proviesec/github-dorks
python3 GitDorker.py \
-tf $GITHUB_TOKEN \
-q target.com \
-d dorks/medium_dorks.txt \
-o gitdorker_target.txt
python3 GitDorker.py \
-tf $GITHUB_TOKEN \
-q "john.doe@target.com" \
-d dorks/medium_dorks.txt
python3 GitDorker.py -tf $GITHUB_TOKEN \
-q -d dorks/medium_dorks.txt