Github search is quite powerful and useful feature and can be used to search sensitive data on the repositories. Collection of github dorks that 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-dork.py is a simple python tool that can search through your repository or your organization/user repositories. Its not a perfect tool at the moment but provides a basic functionality to automate the search on your repositories against the dorks specified in text file.
This tool uses github3.py to talk with GitHub Search API.
Clone this repository and run:
pip install -r requirements.txtGH_USER - Environment variable to specify github user
GH_PWD - Environment variable to specify password
GH_TOKEN - Environment variable to specify github token
Some example usages are listed below:
python github-dork.py -r techgaun/github-dorks # search single repo
python github-dork.py -u techgaun # search all repos of user
python github-dork.py -u dev-nepal # search all repos of an organization
GH_USER=techgaun GH_PWD=<mypass> python github-dork.py -u dev-nepal # search as authenticated user
GH_TOKEN=<github_token> python github-dork.py -u dev-nepal # search using auth token- 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.
- Output formatting is not great. PR welcome
Handle rate limit and retry. PR welcome
Please consider contributing the dorks that can reveal potentially sensitive information in github.
I am not categorizing at the moment. Instead I am going to just the list of dorks with a description. Many of the dorks can be modified to make the search more specific or generic. You can see more options here.
