Advanced GitHub Dorking & Secret Hunting Tool
Dighub is a powerful CLI tool that performs advanced GitHub dorking to detect exposed secrets, credentials, webhooks and sensitive files inside public repositories. With concurrent scanning, multiple output formats, and intelligent filtering, Dighub helps security researchers and DevOps teams identify security vulnerabilities efficiently.
- π Concurrent Scanning - Up to 20 parallel workers for 10x faster scanning
- π― Smart Filtering - Filter by priority (high/medium/low), include/exclude patterns
- π Multiple Output Formats - Terminal, JSON, CSV, HTML reports
- π¨ Beautiful Terminal Output - Colored output with progress bars
- β‘ Rate Limit Handling - Automatic retry with intelligent wait times
- π 100+ Dork Patterns - Comprehensive detection for AWS, GitHub, SSH keys, databases, webhooks, and more
- π Detailed Statistics - Track findings by priority and category
- ποΈ Flexible Configuration - Extensive CLI flags for customization
git clone https://github.com/ahmetartuc/dighub.git
cd dighub
go mod download
go build -o dighub
sudo mv dighub /usr/local/bin/go install github.com/ahmetartuc/dighub@latest# Scan an organization
dighub -org <github-org> -token <your_github_pat>
# Scan a user
dighub -user <github-user> -token <your_github_pat># High priority findings only, save as JSON
dighub -org myorg -token ghp_xxx -priority high -output json
# Concurrent scanning with 10 workers
dighub -org myorg -token ghp_xxx -workers 10
# Filter specific patterns
dighub -org myorg -token ghp_xxx -include "AWS,GitHub" -exclude "backup,log"
# Export to HTML report
dighub -org myorg -token ghp_xxx -output html -out-file report.html
# Quiet mode (URLs only)
dighub -org myorg -token ghp_xxx -quiet
# Verbose mode (detailed output)
dighub -org myorg -token ghp_xxx -verbose-org, -o GitHub organization to scan
-user, -u GitHub user to scan (alternative to org)
-token, -t GitHub Personal Access Token (required)
-output, -f Output format: terminal, json, csv, html (default: terminal)
-out-file, -w Output file path (auto-generated if not specified)
-quiet, -q Quiet mode - only show matches
-verbose, -v Verbose output with detailed information
-no-color, -n Disable colored output
-priority, -p Priority level: all, high, medium, low (default: all)
-include, -i Include specific dorks (comma-separated patterns)
-exclude, -e Exclude specific dorks (comma-separated patterns)
-workers, -W Number of concurrent workers (1-20, default: 5)
-rate-limit, -r Requests per minute (default: 30)
-delay, -d Delay between requests in seconds (default: 2)
Dighub includes dorks for detecting:
- AWS Credentials - Access keys, secret keys, session tokens
- GitHub Tokens - Personal access tokens, OAuth tokens
- SSH Keys - Private keys (RSA, DSA, Ed25519)
- Private Keys & Certificates - PEM files, key files
- Database Credentials - Connection strings, passwords
- Payment Gateway Secrets - Stripe, PayPal, Braintree
- API Keys - OpenAI, Cloudflare, Vercel, and more
- Webhooks - Discord, Slack, Teams, Office 365
- Email Services - SendGrid, Mailgun, SMTP credentials
- Cloud Services - Firebase, Google Services, Azure
- CI/CD Configs - GitHub Actions, Travis, GitLab CI
- Infrastructure - Terraform, Kubernetes configs
- Configuration Files - Settings, properties, ini files
- Log Files - Debug logs, error logs
- Backup Files - SQL dumps, database backups
- History Files - Bash history, zsh history
Colored, organized output grouped by priority with progress bar.
{
"scan_info": {
"target": "myorg",
"scan_date": "2024-01-14T...",
"duration": "5m23s",
"total_dorks": 100
},
"summary": {
"total_matches": 45,
"unique_files": 23,
"high_priority": 12,
"medium_priority": 20,
"low_priority": 13
},
"findings": [...]
}Structured CSV with all finding details for easy analysis in spreadsheets.
Beautiful, interactive HTML report with:
- Executive summary with statistics
- Color-coded priority badges
- Sortable findings
- Direct links to GitHub files
- Responsive design
- Go to GitHub Settings β Developer Settings β Personal Access Tokens
- Click "Generate new token (classic)"
- Select scopes:
public_repo(for public repos only) - Copy the token (starts with
ghp_) - Use it with the
-tokenflag
-
Use concurrent workers for faster scanning:
dighub -org myorg -token xxx -workers 10
-
Filter by priority to focus on critical findings:
dighub -org myorg -token xxx -priority high
-
Use specific includes to target what matters:
dighub -org myorg -token xxx -include "AWS,GitHub,SSH" -
Adjust rate limits based on your token limits:
dighub -org myorg -token xxx -rate-limit 50 -delay 1
dighub -org mycompany -token ghp_xxx -priority high -output htmldighub -org mycompany -token ghp_xxx -workers 10 -output json -out-file security-audit.jsondighub -org mycompany -token ghp_xxx -include "AWS" -verbosedighub -org mycompany -token ghp_xxx -exclude "test,example,demo"- Never commit secrets - Use environment variables or secret managers
- Rotate exposed credentials immediately - If Dighub finds secrets, rotate them
- Use .gitignore - Prevent sensitive files from being committed
- Enable GitHub secret scanning - GitHub's built-in protection
- Regular audits - Run Dighub regularly on your repos
Action Required: Immediately rotate/revoke these credentials
- Direct access to critical systems
- Can cause data breaches or service disruptions
Review Required: Assess risk and take appropriate action
- May provide indirect access or information disclosure
- Should be removed from public repositories
Best Practice: Clean up for security hygiene
- Generally configuration files or less sensitive data
- Should still be reviewed and removed if not needed
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
To add new dork patterns, edit internal/dorks/dorks.go:
{Pattern: "filename:.env NEW_SECRET", Priority: PriorityHigh, Category: "Category", Description: "Description"},This project is licensed under the MIT License - see the LICENSE file for details.
This tool is intended for authorized security research and educational purposes only.
- Only use Dighub on repositories and organizations you have permission to test
- Do not use it for malicious purposes or unauthorized access
- The authors are not responsible for misuse of this tool
- Always comply with applicable laws and GitHub's Terms of Service
- Respect rate limits and API usage policies
Made with β€οΈ for the security community
If you find this tool useful, please consider giving it a β on GitHub!