Skip to main content

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

Project description

RepoRecon

Overview

🔍 RepoRecon is a Python-based command-line tool designed to simplify searching, downloading, and scanning GitHub repositories. The tool seamlessly integrates with Gitleaks to identify and validate secrets such as API keys, tokens, and credentials, enhancing your workflow and security posture.

Features

  • 🧑‍💻 Search GitHub Repositories: Use the GitHub API to search for repositories by keyword.

  • 📥 Download Repositories: Select and download repositories directly from the search results.

  • 🔒 Secrets Scanning: Automatically scan downloaded repositories with Gitleaks to detect sensitive information.

  • ✅ Validation: Validate credentials such as AWS keys, Azure credentials, GitHub tokens, Slack tokens, and more.

  • 🎛️ Interactive or Automated: Choose between manual selection or automated operations for downloading and scanning repositories.

  • 📜 Custom Gitleaks Rules: Use a custom rules.toml file for advanced secrets detection.

Requirements

  • 🐍 Python 3.8 or higher

  • 🔍 Gitleaks installed on your system (Installation Guide)

Installation

The tool can be installed using the Python Package Index (PyPI):

  • pip install RepoRecon

Install it via the source code:

  • Step 1: Clone the Repository:
    • git clone <repository_url>
    • cd GitHubSearchTool
  • Step 2: Install Dependencies

    • Install the required Python packages: -pip install -r requirements.txt
  • Step 3: Install the Tool

    • Use the following command to install the tool:
    • python setup.py install
  • The installation process will ensure that Gitleaks is installed if it is not already.

Usage

Basic Usage

RepoRecon --token <github_token>

  • keyword : The keyword to search for on GitHub.

  • <github_token>: Your GitHub personal access token.

Options

  • 📥 --download: Enable manual selection and download of repositories.

  • 📂 --download-all: Automatically download all repositories matching the keyword.

  • 🔍 --gitleaks: Scan downloaded repositories using Gitleaks.

  • 📁 --destination

  • 📜 --rule-file

Example Workflows

1. Search and Display Results

  • RepoRecon "tesla" --token <your_github_token>

  • This will display a list of repositories related to the keyword "tesla."

2. Download All Repositories

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

  • This will automatically download all matching repositories.

3. Scan Repositories with Gitleaks

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

  • This will download and scan all matching repositories for secrets using Gitleaks.

Supported Validations

The tool validates the following credentials:

  • 🔑 AWS Credentials

  • 🔑 Azure Credentials

  • 🔑 Slack Tokens

  • 🔑 Stripe API Keys

  • 🔑 GitHub Personal Access Tokens

  • 🔑 Heroku API Keys

  • 🔑 Dropbox API Keys

  • 🔑 Twilio API Keys

Using Custom Gitleaks Rules

  • To enhance the detection capabilities, you can provide a custom rules.toml file for Gitleaks. This file allows you to define additional patterns for secrets detection or adjust existing rules.

Example of Running Gitleaks with Custom Rules

githubsearchtool "security" --token <your_github_token> --download-all --gitleaks --rule-file /path/to/rules.toml
  • Ensure that your rules.toml file is correctly configured to meet your detection needs.

Dependencies

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

  • boto3

  • requests

  • rich

  • pyfiglet

  • stripe

Notes

Ensure Gitleaks is installed and accessible in your system's PATH.

Use a GitHub personal access token with appropriate permissions to access the GitHub API.

Contributing

Contributions are welcome! Please fork the repository and create a pull request with your proposed changes.

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 make tools like this possible.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: reporecon-1.0.3.tar.gz
  • Upload date:
  • Size: 11.6 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.3.tar.gz
Algorithm Hash digest
SHA256 80cec0819ac51dd794a78f27e0dd5d7f1120acc0d41faf99f4c04860e3f3b913
MD5 a9509f8aa1da292a278b813c819f0a19
BLAKE2b-256 9ae44c70441fd2ba4351dc080cbe256d79f98a0690958827362b9b23a3beb00d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: RepoRecon-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 11.1 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ccbf57511ce8d0aeea30e3b4880de2a05dd00a2da2498394715f7cf8dbd542e9
MD5 eadb61e7a0f22d748bdb7842ff39bfbc
BLAKE2b-256 d24054698b4b2a2928a4e5ae3d70b876cd858d39728688b62608f96a1dae1a12

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