diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 174a953..2a3011c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -52,13 +52,21 @@ git remote -v python3 -m venv venv source venv/bin/activate -# Install dependencies +# Install dependencies (includes dev tools) pip install -e ".[dev]" # Run tests pytest tests/ -v ``` +**💡 Pro Tip**: The `[dev]` extras include everything needed for development: +- **pytest** - Testing framework +- **flake8** - Linting +- **black** - Code formatter +- **isort** - Import sorting +- **bandit** - Security scanning +- **safety** - Dependency vulnerability checking + --- ## 🌳 Branching Strategy diff --git a/README.md b/README.md index 34112ea..554c44a 100644 --- a/README.md +++ b/README.md @@ -191,39 +191,61 @@ All tests: **PASSING ✅** ## 📦 Installation +Install ShieldCommit via pip: + ```bash -pip install shieldcommit +pip install shieldcommit ``` - -Verify installation: + +Verify the installation: ```bash shieldcommit --help ``` -## 🔧 Getting Started (Quick Setup) - -**2️⃣ Initialize a Git repository (if not already)** +## 🚀 Quick Start (60 seconds) +### Step 1: Initialize Git (if needed) ```bash +cd your-project git init ``` -**3️⃣ Install ShieldCommit Git hook** - +### Step 2: Install ShieldCommit Hook ```bash shieldcommit install ``` -✅ This installs a **pre-commit hook** in your repository. +✅ **Done!** ShieldCommit is now protecting your commits. + +### Step 3: Try It (optional) +To test if it works, try committing a fake secret: +```bash +echo "aws_secret_access_key = AKIAIOSFODNN7EXAMPLE" > config.txt +git add config.txt +git commit -m "test commit" # ← This will be BLOCKED ✅ +``` ## 🔒 How It Works -Once installed: +Once installed as a **Git pre-commit hook**: + +1. **Every commit** automatically scans staged files +2. **Secrets detected** → Commit is blocked +3. **You see**: File name, line number, confidence level, and detection method +4. **Fix the secret** → Commit again +5. **Never leaks** → Secrets stay out of Git history + +### Example Output +When a secret is detected: +``` +❌ Secret detected in config.txt: -- Every `git commit` automatically scans **staged files** -- If secrets are detected → **commit is blocked** -- You'll see the file, line number, and matched pattern -- Fix or remove the secret, then commit again +File: config.txt +Line: 5 +Type: AWS Access Key (Format Detection) +Confidence: 95% +Value: AKIA... (masked) -This ensures secrets never accidentally reach your Git history. \ No newline at end of file +Fix the secret and try again! +``` \ No newline at end of file