-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Git Security Scanner documentation!
- Getting Started
- Installation
- Configuration
- Usage Examples
- API Reference
- CI/CD Integration
- Custom Patterns
- Troubleshooting
- FAQ
Git Security Scanner is a comprehensive tool designed to detect secrets and sensitive information in Git repositories before they get exposed.
- 🔍 Detects 25+ types of secrets
- ⚡ Fast parallel scanning
- 📊 Multiple export formats
- 🔧 Highly configurable
- 🚀 CI/CD ready
This guide will help you get up and running with Git Security Scanner in minutes.
- Python 3.7 or higher
- Git installed on your system
- A Git repository to scan
The easiest way to install Git Security Scanner is from PyPI:
pip install git-security-scannerIf you want the latest development version:
git clone https://github.com/vyacheslavmeyerzon/security-scanner.git
cd security-scanner
pip install -e .Navigate to any Git repository and run:
git-security-scannerThis will scan:
- All files in the working directory
- The last 100 commits in history
- Display findings in the console
The scanner uses color-coded severity levels:
- 🔴 CRITICAL (Red): Database passwords, private keys
- 🟡 HIGH (Yellow): API keys, access tokens
- 🟣 MEDIUM (Purple): Potential secrets
- 🔵 LOW (Blue): Configuration issues
Example output:
[CRITICAL] MongoDB Connection
Description: MongoDB Connection String with credentials
File: config.py
Line: 15
Secret: mongodb://user:****@localhost/db
Check files before committing:
git add .
git-security-scanner --pre-commitScan without history for faster results:
git-security-scanner --no-historyGenerate an HTML report:
git-security-scanner --export security-report.htmlOpen the HTML file in your browser for an interactive report.
Fail the build if secrets are found:
git-security-scanner --quiet || exit 1Create .gitscannerrc.json in your repository:
{
"output": {
"min_severity": "MEDIUM"
},
"scan": {
"history_limit": 50
}
}Create .gitscannerignore:
# Ignore test files
tests/
*.test.py
# Ignore example files
examples/
*.example
- Configuration Guide - Advanced configuration options
- CI/CD Integration - Set up automated scanning
- Custom Patterns - Add your own detection patterns
- API Reference - Use as a Python library
- Check the FAQ
- Report issues on GitHub
- Read the full documentation