Skip to content

Maha1503/Git_detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” Git Detector

A Python-based tool designed to scan Git repositories for potential sensitive data leaks, such as API keys, passwords, private keys, and certificates. It analyzes the entire Git history, ensuring no hidden secrets escape detection.


πŸš€ Features

  • Deep Scan: Traverses full Git commit history.
  • Sensitive Data Detection: Identifies:
    • πŸ”‘ Passwords
    • πŸ—οΈ API Keys (AWS, OpenAI, Google, etc.)
    • πŸ“„ RSA & SSH Private Keys
    • πŸ” TLS/SSL Certificates
    • πŸ—ƒοΈ Database Credentials
  • User-Friendly Output: Color-coded results for easy analysis.

πŸ“¦ Requirements

Before running the tool, install the necessary dependencies:

pip install -r requirements.txt

⚑ Pre-execution Setup

Before running the tool, ensure all Git repositories are marked as trusted to avoid permission errors:

git config --global --add safe.directory '*'

πŸ’» Usage

  1. Clone the repository:

    git clone <your-repo-link>
    cd Git_detector
  2. Run the tool: Run the git_detector.exe file.

  3. For scanning a specific repository: Select the repo to be scanned and save scanned results.


πŸ“ Output Example

The tool highlights sensitive data types along with their respective commit IDs for easy tracking and removal.

[Password] Hardcoded password found
Commit: cc8a4c6
Key: my_secret_password

[RSA Private Key] RSA Private Key found
Commit: b20f5b8
Key: -----BEGIN RSA PRIVATE KEY-----

βš–οΈ Disclaimer

This tool is intended for ethical use only. Always ensure you have proper authorization before scanning repositories.



Contribution

This repo is open for contribution, need to update regex patterns for different keys (APIs keys, passwords, usernames, certificate keys). If you'd like to improve Git_detector, check out the Contributing Guidelines and open a pull request.


πŸš€ Happy Hunting!

Releases

No releases published

Packages

No packages published