Source Control Hacking
Open source software, while fostering collaboration, can introduce information security risks during the information gathering phase.
Searching for potentially sensitive information on GitHub, sometimes referred to as "GitHub hacking" or "GitHub dorking," involves using advanced search queries to discover repositories or code snippets containing unintentionally exposed credentials, proprietary code, or other sensitive data. While GitHub provides a powerful platform for collaboration, it's essential to be aware that information might inadvertently be disclosed.
Here's a brief overview:
Exposed Credentials:
Example:
filename:.env password
Purpose: Searches for files named ".env" that may contain sensitive information like passwords.
API Keys and Tokens:
Example:
filename:config.js token
Purpose: Looks for configuration files that might include API keys or authentication tokens.
Specific Code Patterns:
Example:
filename:docker-compose.yml aws_access_key_id
Purpose: Identifies Docker Compose files that might contain AWS access key information.
Vulnerable Dependencies:
Example:
filename:package.json "dependencies" "vulnerable"
Purpose: Searches for package.json files indicating dependencies with known vulnerabilities.
Source Code Leaks:
Example:
filename:.gitattributes password
Purpose: Scans for Git attribute files that may inadvertently expose sensitive information.
Public API Keys:
Example:
filename:config.json api_key
Purpose: Searches for configuration files containing API keys in JSON format.
Resources:
Last updated