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.7.tar.gz (12.0 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.7-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: reporecon-1.0.7.tar.gz
  • Upload date:
  • Size: 12.0 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.7.tar.gz
Algorithm Hash digest
SHA256 d124c882455fc830f14f5f66437652647c830594df71f7606e8f4123a7c83912
MD5 19f52989e7b30627c82ccd6222e21f84
BLAKE2b-256 5e1cb2fddc5c25c34c8d779cca6641dc5c7776a2959165fe7e309cfac9bdfce2

See more details on using hashes here.

File details

Details for the file RepoRecon-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: RepoRecon-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 11.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4375faaa011ce44a63d0d392a52c1ce129d128e2629cf2aa04557216d23a3b03
MD5 e9959c4f9729f8424a84a1acdd8ba3c2
BLAKE2b-256 f9e70761744da4de06ab1ea7e37b1e0683b8db09c348148252b1a41814831423

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