GitHub Dorks

September 15, 2026 ยท View on GitHub

Docker Build & Test

GitHub Dorks

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 Dork Search Tool

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.

Installation

This tool uses github3.py to talk with GitHub Search API.

Clone this repository and run:

pip install .

Docker Installation

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.csv

Usage

GH_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 instance

github-dorks -r techgaun/github-dorks --max-retries 5         # retry recoverable failures up to five times

github-dorks -r techgaun/github-dorks --format json           # stream JSON to stdout

github-dorks -u dev-nepal --format jsonl -o results.jsonl     # write newline-delimited JSON

github-dorks -u dev-nepal --format csv -o results.csv --force # explicitly replace an existing file

github-dorks --list-categories                                # list bundled dictionaries

github-dorks -r techgaun/github-dorks -c cloud -c devops      # scan selected categories

github-dorks --local ./cloned-repo -c ai -c identity          # scan a local working tree

github-dorks --local . --format jsonl -o local-results.jsonl  # save offline results

The legacy python github-dork.py ... invocation remains available for compatibility. The package can also run as python -m github_dorks ....

Each scan ends with a summary of queries, matches, failures, retries, and elapsed time. The command exits with status 0 after a complete scan, 2 when one or more queries failed, and 1 for fatal configuration, file, or authentication errors.

Local scans do not require GitHub credentials or network access. In a Git working tree, the scanner checks tracked files and non-ignored untracked files; elsewhere it recursively checks files while excluding .git. It supports the dictionary syntax used by this project, including quoted text, OR, NOT, and the filename:, path:, extension:, and common language: qualifiers. Binary files and files larger than 1 MB are skipped by default. Override that limit in bytes with --max-file-size.

Supported result formats are text, csv, json, and jsonl. Text is the default for terminal output; using -o/--output without --format preserves the historical CSV default. Existing files are protected unless --force is provided. Use --quiet to suppress progress and summaries, or --verbose to print every query as it runs. Structured stdout remains machine-readable because status messages are sent to stderr.

The bundled dictionary is split into ai, cloud, databases, devops, frameworks, identity, observability, private-keys, saas, and system categories. Repeat -c/--category to combine categories. With no category or custom --dork file, the command uses the backward-compatible github-dorks.txt aggregate. That aggregate is generated from the category files with python scripts/build-dorks.py.

Development

Run the dependency-free unit test suite with:

python -m unittest discover -s tests -v

The CI test matrix covers Python 3.10 through 3.13.

Limitations

  • Authenticated requests receive higher rate limits. Searches may pause until GitHub resets the search limit.
  • Large category combinations can take time because GitHub applies a separate search rate limit.
  • Offline scanning inspects the current working tree only; Git history scanning is not yet supported.

Contribution

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.

List of Dorks

The canonical dictionaries are the categorized files. The generated github-dorks.txt file contains every category for backward compatibility. 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.

DorkDescription
filename:.npmrc _authnpm registry authentication data
filename:.dockercfg authdocker registry authentication data
extension:pem privateprivate keys
extension:ppk privateputtygen private keys
filename:id_rsa or filename:id_dsaprivate ssh keys
extension:sql mysql dumpmysql dump
extension:sql mysql dump passwordmysql dump look for password; you can try varieties
filename:credentials aws_access_key_idmight return false negatives with dummy values
filename:.s3cfgmight return false negatives with dummy values
filename:wp-config.phpwordpress config files
filename:.htpasswdhtpasswd files
filename:.env DB_USERNAME NOT homesteadlaravel .env (CI, various ruby based frameworks too)
filename:.env MAIL_HOST=smtp.gmail.comgmail smtp configuration (try different smtp services too)
filename:.git-credentialsgit credentials store, add NOT username for more valid results
PT_TOKEN language:bashpivotaltracker tokens
filename:.bashrc passwordsearch for passwords, etc. in .bashrc (try with .bash_profile too)
filename:.bashrc mailchimpvariation of above (try more variations)
filename:.bash_profile awsaws access and secret keys
rds.amazonaws.com passwordAmazon RDS possible credentials
extension:json api.forecast.iotry variations, find api keys/secrets
extension:json mongolab.commongolab credentials in json configs
extension:yaml mongolab.commongolab credentials in yaml configs (try with yml)
jsforce extension:js conn.loginpossible salesforce credentials in nodejs projects
SF_USERNAME salesforcepossible salesforce credentials
filename:.tugboat NOT _tugboatDigital Ocean tugboat config
HEROKU_API_KEY language:shellHeroku api keys
HEROKU_API_KEY language:jsonHeroku api keys in json files
filename:.netrc passwordnetrc that possibly holds sensitive credentials
filename:_netrc passwordnetrc that possibly holds sensitive credentials
filename:hub oauth_tokenhub config that stores github tokens
filename:robomongo.jsonmongodb credentials file used by robomongo
filename:filezilla.xml Passfilezilla config file with possible user/pass to ftp
filename:recentservers.xml Passfilezilla config file with possible user/pass to ftp
filename:config.json authsdocker registry authentication data
filename:idea14.keyIntelliJ Idea 14 key, try variations for other versions
filename:config irc_passpossible IRC config
filename:connections.xmlpossible db connections configuration, try variations to be specific
filename:express.conf path:.openshiftopenshift config, only email and server thou
filename:.pgpassPostgreSQL file which can contain passwords
filename:proftpdpasswdUsernames and passwords of proftpd created by cpanel
filename:ventrilo_srv.iniVentrilo configuration
[WFClient] Password= extension:icaWinFrame-Client infos needed by users to connect toCitrix Application Servers
filename:server.cfg rcon passwordCounter Strike RCON Passwords
JEKYLL_GITHUB_TOKENGithub tokens used for jekyll
filename:.bash_historyBash history file
filename:.cshrcRC file for csh shell
filename:.historyhistory file (often used by many tools)
filename:.sh_historykorn shell history
filename:sshd_configOpenSSH server config
filename:dhcpd.confDHCP service config
filename:prod.exs NOT prod.secret.exsPhoenix prod configuration file
filename:prod.secret.exsPhoenix prod secret
filename:configuration.php JConfig passwordJoomla configuration file
filename:config.php dbpasswdPHP application database password (e.g., phpBB forum software)
path:sites databases passwordDrupal website database credentials
shodan_api_key language:pythonShodan API keys (try other languages too)
filename:shadow path:etcContains encrypted passwords and account information of new unix systems
filename:passwd path:etcContains user account information including encrypted passwords of traditional unix systems
extension:avastlic "support.avast.com"Contains license keys for Avast! Antivirus
filename:dbeaver-data-sources.xmlDBeaver config containing MySQL Credentials
filename:.esmtprc passwordesmtp configuration
extension:json googleusercontent client_secretOAuth credentials for accessing Google APIs
HOMEBREW_GITHUB_API_TOKEN language:shellGithub token usually set by homebrew users
xoxp OR xoxbSlack bot and private tokens
.mlab.com passwordMLAB Hosted MongoDB Credentials
filename:logins.jsonFirefox saved password collection (key3.db usually in same repo)
filename:CCCam.cfgCCCam Server config file
msg nickserv identify filename:configPossible IRC login passwords
filename:settings.py SECRET_KEYDjango secret keys (usually allows for session hijacking, RCE, etc)
filename:secrets.yml passwordUsernames/passwords, Rails applications
filename:master.key path:configRails master key (used for decrypting credentials.yml.enc for Rails 5.2+)
filename:deployment-config.jsonCreated by sftp-deployment for Atom, contains server details and credentials
filename:.ftpconfigCreated by remote-ssh for Atom, contains SFTP/SSH server details and credentials
filename:.remote-sync.jsonCreated by remote-sync for Atom, contains FTP and/or SCP/SFTP/SSH server details and credentials
filename:sftp.json path:.vscodeCreated by vscode-sftp for VSCode, contains SFTP/SSH server details and credentails
filename:sftp-config.jsonCreated by SFTP for Sublime Text, contains FTP/FTPS or SFTP/SSH server details and credentials
filename:WebServers.xmlCreated by Jetbrains IDEs, contains webserver credentials with encoded passwords (not encrypted!)
"api_hash" "api_id"Telegram API token
"https://hooks.slack.com/services/"Slack services URL often have secret API token as a suffix
filename:github-recovery-codes.txtGitHub recovery key
filename:gitlab-recovery-codes.txtGitLab recovery key
filename:discord_backup_codes.txtDiscord recovery key
extension:yaml cloud.redislabs.comRedis credentials provided by Redis Labs found in a YAML file
extension:json cloud.redislabs.comRedis credentials provided by Redis Labs found in a JSON file