Skip to main content

A CLI tool to search GitHub repositories and integrate Gitleaks for scanning.

Project description

RepoRecon - Advanced GitHub Repository Reconnaissance Tool

๐Ÿš€ Overview

RepoRecon is a powerful Python-based command-line tool designed to enhance security professionals' and developers' ability to search, download, and scan GitHub repositories efficiently. The tool seamlessly integrates with Gitleaks to detect and validate sensitive information, such as API keys, tokens, and credentials, ensuring your workflow remains secure and streamlined.

โœจ Features

  • ๐Ÿ” Search GitHub Repositories โ€“ Utilize the GitHub API to find repositories based on a keyword.
  • ๐Ÿ“ฅ Download Repositories โ€“ Selectively or automatically download repositories directly from search results.
  • ๐Ÿ”’ Secrets Scanning โ€“ Perform automated scans using Gitleaks to uncover sensitive data.
  • โœ… Credential Validation โ€“ Verify AWS keys, Azure credentials, GitHub tokens, Slack tokens, and more.
  • ๐ŸŽ›๏ธ Flexible Operation Modes โ€“ Choose between interactive and automated execution.
  • ๐Ÿ“œ Custom Gitleaks Rules โ€“ Enhance scanning with custom rules.toml configurations.

โš™๏ธ Requirements

๐Ÿ“ฆ Installation

Install via PyPI:

pip install RepoRecon

Install from Source:

# Step 1: Clone the Repository
git clone <repository_url>
cd RepoRecon

# Step 2: Install Dependencies
pip install -r requirements.txt

# Step 3: Install the Tool
python setup.py install

The installation process ensures that Gitleaks is installed if not already present.

๐Ÿš€ Usage

Basic Syntax:

RepoRecon <keyword> --token <github_token>
  • <keyword>: The term to search for on GitHub.
  • <github_token>: Your GitHub personal access token.

Command-Line Options:

Option Description
๐Ÿ“ฅ --download Enables manual selection and downloading of repositories.
๐Ÿ“‚ --download-all Automatically downloads all repositories matching the keyword.
๐Ÿ” --gitleaks Scans downloaded repositories for secrets using Gitleaks.
๐Ÿ“ --destination <path> Specifies a directory to store downloaded repositories (default: ./downloaded_repos).
๐Ÿ“œ --rule-file <path> Defines a custom Gitleaks rule file for enhanced scanning.

๐Ÿ”„ Example Workflows

1๏ธโƒฃ Search and Display Results

RepoRecon "tesla" --token <your_github_token>

Displays a list of repositories related to the keyword "tesla".

2๏ธโƒฃ Download All Matching Repositories

RepoRecon "tesla" --token <your_github_token> --download-all

Automatically downloads all repositories that match the search criteria.

3๏ธโƒฃ Scan Repositories with Gitleaks

RepoRecon "tesla" --token <your_github_token> --download-all --gitleaks

This command downloads and scans all matching repositories for secrets.

๐Ÿ” Supported Credential Validations

RepoRecon validates the following sensitive credentials:

  • ๐Ÿ”‘ AWS Credentials
  • ๐Ÿ”‘ Azure Credentials
  • ๐Ÿ”‘ Slack Tokens
  • ๐Ÿ”‘ Stripe API Keys
  • ๐Ÿ”‘ GitHub Personal Access Tokens
  • ๐Ÿ”‘ Heroku API Keys
  • ๐Ÿ”‘ Dropbox API Keys
  • ๐Ÿ”‘ Twilio API Keys

๐Ÿ“œ Custom Gitleaks Rules

Enhance detection capabilities using a custom rules.toml file, allowing additional secret-detection patterns.

Example: Running Gitleaks with Custom Rules

githubsearchtool "security" --token <your_github_token> --download-all --gitleaks --rule-file /path/to/rules.toml

Ensure the rules.toml file is correctly configured to match your detection requirements.

๐Ÿ“Œ Dependencies

The following Python packages are required (listed in requirements.txt):

  • boto3
  • requests
  • rich
  • pyfiglet
  • stripe

๐Ÿ“ข Notes

  • Ensure Gitleaks and git are installed and accessible in your system's PATH.
  • Use a GitHub personal access token with appropriate permissions to access the GitHub API.
  • Make Sure that you are using the **rules.toml" file

๐Ÿค Contributing

We welcome contributions! If you have enhancements or bug fixes, fork the repository and submit a pull request.

๐Ÿ“œ License

This project is licensed under the MIT License. See the LICENSE file for details.

๐Ÿ™ Acknowledgments

Special thanks to the creators of Gitleaks and all open-source contributors who help improve security research tools like RepoRecon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reporecon-1.0.9.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

reporecon-1.0.9-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file reporecon-1.0.9.tar.gz.

File metadata

  • Download URL: reporecon-1.0.9.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for reporecon-1.0.9.tar.gz
Algorithm Hash digest
SHA256 b2d37f708400d5e97d77f3f36ae6ec706eb72b7e32d1322dc5c2f315d8baecf7
MD5 c0f8a51b015edb5bbc9f36b4ab4b5551
BLAKE2b-256 d8fcefe59be8336cee9c424e10d4d2762d1c7487784de57f570c8340e030779b

See more details on using hashes here.

File details

Details for the file reporecon-1.0.9-py3-none-any.whl.

File metadata

  • Download URL: reporecon-1.0.9-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for reporecon-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 341117f6be26e34634b0c0c8b61c89fb842c380472457cc3b46fa1c0f54055cd
MD5 26ba411e892fc062b5e1810da924e0e1
BLAKE2b-256 653253c15ff13810d27131e9ef3b07b408f8b8f6521b853a1d5f7ef9d5dde62a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page