Github Search is a quite powerful and useful feature that can be used to search for sensitive data on repositories. Collection of Github dorks can reveal sensitive personal and/or organizational information such as private keys, credentials, authentication tokens, etc. This list is supposed to be useful for assessing security and performing pen-testing of systems.
github-dorks is a Python command-line tool that searches a repository or an
organization/user's repositories using the queries in a dorks file.
This tool uses github3.py to talk with GitHub Search API.
Clone this repository and run:
pip install .You can also run github-dorks using Docker for a consistent environment:
# Build the Docker image
docker build -t github-dorks .
# Run with a GitHub token (recommended)
docker run -e GH_TOKEN=your_github_token github-dorks -u someuser
# Run with username/password
docker run -e GH_USER=your_username -e GH_PWD=your_password github-dorks -u someuser
# Save results to a CSV file
docker run -v $(pwd)/output:/app/output -e GH_TOKEN=your_github_token github-dorks -u someuser -o /app/output/results.csvGH_USER - Environment variable to specify Github user
GH_PWD - Environment variable to specify a password
GH_TOKEN - Environment variable to specify Github token
GH_URL - Environment variable to specify GitHub Enterprise base URL
Some example usages are listed below:
github-dorks -r techgaun/github-dorks # search a single repo
github-dorks -u techgaun # search all repos of a user
github-dorks -u dev-nepal # search all repos of an organization
GH_USER=techgaun GH_PWD=<mypass> github-dorks -u dev-nepal # search as authenticated user
GH_TOKEN=<github_token> github-dorks -u dev-nepal # search using auth token
GH_URL=https://github.example.com github-dorks -u dev-nepal # search a GitHub Enterprise instanceThe legacy python github-dork.py ... invocation remains available for
compatibility. The package can also run as python -m github_dorks ....
Run the dependency-free unit test suite with:
python -m unittest discover -s tests -vThe CI test matrix covers Python 3.10 through 3.13.
- Authenticated requests get a higher rate limit. But, since this tool waits for the api rate limit to be reset (which is usually less than a minute), it can be slightly slow.
- Search results can be printed to the terminal or written as CSV.
Handle rate limit and retry. PR welcome
Please consider contributing dorks that can reveal potentially sensitive information on Github. Documented sources for newer credential families are maintained in docs/dork-sources.md.
The canonical, categorized dictionary is github-dorks.txt. The table below provides descriptions for many established patterns; newer credential families and their vendor references are tracked in docs/dork-sources.md. Many dorks can be modified to make the search more specific or generic. You can see more options here.
