Skip to content

A desktop GUI application for scanning GitHub repositories and commit history to detect sensitive information such as API keys, passwords, tokens, environment files, and other security vulnerabilities.

Notifications You must be signed in to change notification settings

dev-alt/GitGuard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

26 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›ก๏ธ GitGuard - GitHub Security Scanner

Python 3.10+ Tkinter GUI MIT License Cross Platform

Security Scanning 37+ Patterns Multi-Format Export

๐Ÿ” A powerful desktop GUI application for scanning GitHub repositories and commit history to detect accidentally committed sensitive information like API keys, passwords, tokens, and other security vulnerabilities.

๐Ÿš€ Fast โ€ข ๐ŸŽฏ Accurate โ€ข ๐Ÿ”’ Secure โ€ข ๐ŸŽจ User-Friendly


๐Ÿšจ Security Notice

โš ๏ธ IMPORTANT: GitGuard is a defensive security tool designed to help users identify accidentally committed sensitive information in their own repositories. Never use this tool to scan repositories you don't own or have explicit permission to analyze.


โœจ Features Overview

๐Ÿ” Core Scanning & Detection

  • ๐ŸŒŸ Comprehensive Scanning: Analyzes entire repository history including all commits
  • ๐Ÿง  Advanced Pattern Detection: Identifies 37+ types of sensitive data with intelligent context-aware filtering
  • ๐ŸŽฏ False Positive Elimination: Smart filtering for test files, documentation, checksums, and development configs
  • ๐Ÿ“Š Risk Assessment: Automatic risk scoring with color-coded visualization and severity categorization

๐Ÿ–ฅ๏ธ User Interface & Workflow

  • โœจ Professional GUI: User-friendly Tkinter interface with 4-tab workflow and comprehensive menu system
  • ๐Ÿ” Authentication Management: Secure token storage with optional obfuscation and user consent warnings
  • ๐ŸŽจ Custom Pattern Editor: GUI-based creation, testing, and management of custom detection rules
  • ๐Ÿ› ๏ธ Advanced Error Handling: Context-aware error dialogs with technical details and suggested solutions

โšก Performance & Export

  • ๐Ÿš€ High-Performance Scanning: 10x faster with batch processing and smart file prioritization
  • ๐ŸŒ Professional HTML Reports: Auto-opening responsive reports with statistics and risk visualization
  • ๐Ÿ“„ Multi-Format Export: Generate reports in CSV, JSON, and HTML with comprehensive metadata
  • ๐Ÿง  Intelligent Caching: Repository-specific result caching with commit-hash validation

๐Ÿ”’ Security & Privacy

  • ๐Ÿ  Local Processing: All scanning performed locally - no data transmitted to external services
  • ๐Ÿ›ก๏ธ Secure Authentication: Optional GitHub token storage with encryption warnings and user control
  • โš™๏ธ Configuration Management: Persistent settings with import/export and security controls
  • ๐Ÿ“ Comprehensive Logging: Full application logging with session tracking and performance metrics

๐Ÿ•ต๏ธ Detected Sensitive Data Types

๐Ÿ”‘ API Keys & Tokens (Click to expand)
Service Pattern Example Risk Level
๐Ÿ”ถ AWS Access Keys AKIA[0-9A-Z]{16} ๐Ÿ”ด Critical
๐Ÿ™ GitHub PAT ghp_[a-zA-Z0-9]{36} ๐Ÿ”ด Critical
๐Ÿ”ฅ Firebase Keys AIza[0-9A-Za-z-_]{35} ๐ŸŸ  High
๐Ÿ’ณ Stripe API sk_live_, sk_test_ ๐Ÿ”ด Critical
๐Ÿ“ง SendGrid SG.[0-9A-Za-z-_]{22} ๐ŸŸ  High
๐Ÿ“ฑ Twilio AC[a-f0-9]{32} ๐ŸŸ  High
๐Ÿ’ฐ PayPal EO[0-9A-Za-z-_]{50} ๐Ÿ”ด Critical
๐Ÿ›๏ธ Shopify shpat_[a-zA-Z0-9]{32} ๐ŸŸ  High
๐Ÿ—ƒ๏ธ Database Credentials (Click to expand)
  • ๐Ÿƒ MongoDB: mongodb://[user:pass@]host:port/db
  • ๐Ÿฌ MySQL: mysql://[user:pass@]host:port/db
  • ๐Ÿ˜ PostgreSQL: postgresql://[user:pass@]host:port/db
  • ๐Ÿ—„๏ธ Redis: Connection strings with embedded credentials
  • ๐Ÿ”— Generic DB URLs: Any connection URL with embedded credentials
๐Ÿ” Private Keys & Certificates (Click to expand)
  • ๐Ÿ”‘ RSA Private Keys: -----BEGIN RSA PRIVATE KEY-----
  • ๐Ÿ”’ SSH Private Keys: -----BEGIN OPENSSH PRIVATE KEY-----
  • ๐Ÿ›ก๏ธ PGP Private Keys: -----BEGIN PGP PRIVATE KEY-----
  • ๐Ÿ“œ SSL/TLS Certificates: Various certificate formats
  • ๐ŸŽซ JWT Tokens: JSON Web Tokens with high entropy
๐ŸŒ Environment Variables (Click to expand)
  • โšก Common Secrets: SECRET, PASSWORD, TOKEN, KEY
  • โ˜๏ธ AWS Variables: AWS_ACCESS_KEY, AWS_SECRET_KEY
  • ๐Ÿ”ง API Keys: .env format API keys and tokens
  • ๐Ÿณ Docker Secrets: Docker Compose environment secrets
  • โ˜ธ๏ธ Kubernetes: Secret manifests and config maps

๐Ÿ†• Latest Improvements (Session 7)

๐ŸŽ‰ Major Feature Updates ๐ŸŽ‰

๐Ÿ” Authentication & Token Management

  • ๐Ÿ’พ Save Authentication Button: New manual save option for GitHub credentials
  • ๐Ÿ” Secure Token Storage: Optional GitHub token persistence with Base64 obfuscation
  • โš ๏ธ Security Warnings: Clear consent dialogs for token storage with risk explanations
  • ๐Ÿ”„ Auto-Load Credentials: Automatic restoration of saved authentication on startup

๐Ÿ“Š Export & Report Enhancements

  • ๐ŸŒ Auto-Open HTML Reports: HTML exports now automatically open in browser
  • ๐Ÿ“ˆ Enhanced Report Quality: Improved error handling and fallback mechanisms
  • ๐Ÿ“ Output Organization: Default output folder creation with proper gitignore protection

๐ŸŽฏ False Positive Detection Improvements

  • ๐Ÿงช Smart Test File Filtering: Automatic detection and filtering of test files (_test.go, /tests/, etc.)
  • ๐Ÿ“š Documentation Exclusions: Skip obvious examples in .md files and documentation
  • ๐Ÿ”ง Development Config Filtering: Intelligent handling of docker-compose.dev.yml and localhost configs

๐Ÿ”ฌ Detection Accuracy Improvements

  • โš”๏ธ Basic Auth False Positives: Enhanced filtering for game content ("Basic Sword" vs authentication)
  • ๐Ÿงฎ Checksum File Handling: Proper exclusion of Go package checksums (go.sum) from secret detection
  • ๐Ÿ” Template Pattern Recognition: Filter environment variable templates like ${JWT_SECRET}
  • ๐Ÿ—ƒ๏ธ Database Credential Filtering: Smart detection of test/development database connections

๐Ÿš€ Quick Start

๐Ÿ“‹ Prerequisites

Python 3.10+ Git Required GitHub Token

๐Ÿ“ฅ Installation

# Clone the repository
git clone https://github.com/dev-alt/GitGuard.git
cd GitGuard

# Install dependencies
pip install -r requirements.txt

# Launch GitGuard
python src/gui.py

๐ŸŽฏ Quick Usage

  1. ๐Ÿ” Authenticate: Enter your GitHub token in the Authentication tab
  2. ๐Ÿ“‚ Load Repositories: Browse and select repositories from your GitHub account
  3. ๐Ÿ” Configure Scan: Choose scan depth and configure detection patterns
  4. โ–ถ๏ธ Start Scanning: Click scan and watch real-time progress
  5. ๐Ÿ“Š Review Results: Export results to HTML, CSV, or JSON formats

๐ŸŽจ Custom Pattern Editor

๐Ÿ› ๏ธ Create Your Own Detection Rules!

GitGuard includes a powerful GUI-based pattern editor for creating custom detection rules:

# Example Custom Pattern
Name: Internal API Key
Description: Company-specific API key format  
Pattern: MYCO_API_[A-Za-z0-9]{32}
Risk Level: HIGH

Features:

  • ๐ŸŽฏ Real-time Regex Testing: Test patterns before saving
  • ๐Ÿ“š Pattern Library: Import/Export pattern collections
  • ๐Ÿ”ง JSON Export/Import: Share patterns across installations
  • โœ… Validation: Automatic pattern validation and suggestions

๐Ÿ› ๏ธ Advanced Configuration

โš™๏ธ Scanning Configuration (Click to expand)

Scan Depth Options

  • ๐Ÿ„ Surface (Latest Commit): Fast scanning of current repository state
  • ๐ŸŠ Deep (Full History): Complete commit history analysis
  • ๐Ÿ—๏ธ Custom: User-defined commit range and file filtering

Performance Tuning

  • ๐Ÿ“Š Batch Processing: Configure concurrent file operations
  • ๐ŸŽฏ File Prioritization: Scan high-risk files first
  • ๐Ÿ’พ Intelligent Caching: Skip unchanged repositories
  • โฑ๏ธ Timeout Controls: Prevent hung operations
๐Ÿ“Š Export Formats (Click to expand)

Available Formats

  • ๐ŸŒ HTML: Interactive reports with charts and statistics
  • ๐Ÿ“„ CSV: Spreadsheet-compatible tabular data
  • ๐Ÿ“ JSON: Structured data for programmatic analysis

Report Features

  • ๐Ÿ“ˆ Risk Visualization: Color-coded severity indicators
  • ๐Ÿ“Š Statistical Analysis: Finding counts by type and severity
  • ๐Ÿ”— Interactive Navigation: Click-to-view source code
  • ๐Ÿ“… Metadata: Scan configuration and timestamp information

๐Ÿค Contributing

We welcome contributions! Here's how you can help:

Report Issues Submit PR Join Discussion

  1. ๐Ÿด Fork the repository
  2. ๐ŸŒฟ Create a feature branch (git checkout -b feature/amazing-feature)
  3. ๐Ÿ’พ Commit your changes (git commit -m 'Add amazing feature')
  4. ๐Ÿš€ Push to branch (git push origin feature/amazing-feature)
  5. ๐Ÿ“ฎ Open a Pull Request

๐Ÿ“„ License

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

MIT License

๐Ÿ™ Acknowledgments

  • ๐Ÿ™ GitHub API: For providing excellent repository access
  • ๐Ÿ Python Community: For the amazing ecosystem and libraries
  • ๐Ÿ” Security Researchers: For inspiration and pattern identification
  • ๐Ÿ‘ฅ Open Source Community: For feedback and contributions

๐ŸŒŸ Star this repository if you find it helpful! โญ

GitHub Stars GitHub Forks GitHub Watchers

Made with โค๏ธ for the security community


GitGuard - Protecting your repositories, one commit at a time ๐Ÿ›ก๏ธ

About

A desktop GUI application for scanning GitHub repositories and commit history to detect sensitive information such as API keys, passwords, tokens, environment files, and other security vulnerabilities.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages