skills/privacy-review/SKILL.md
Automated privacy review for git repositories. Scans for sensitive data exposure including API keys, passwords, database credentials, and tokens. Use before pushing to public repositories or sharing code. Trigger by running 'python privacy_scan.py' on a git repository.
npx skillsauth add emliunix/home.conf privacy-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Automated privacy security review for git repositories. Detects sensitive data exposure in committed files and repository configuration.
When to use:
Scans git history for committed files with sensitive extensions:
.env, .env.local - Environment configuration.pem, .p12 - Private keys and certificates*_secrets.* - Secret configuration*_credentials.* - API credentialsPattern-based scanning for sensitive patterns in source files:
postgresql://user:pass@host)sk-, AKIA, Bearer)Verifies that .env and other sensitive files are properly ignored.
Checks if local .env exists with real credentials (not committed).
# Scan current directory
python privacy_scan.py
# Scan specific repository
python privacy_scan.py --repo-path /path/to/repo
# Quiet mode (show only issues)
python privacy_scan.py --quiet
The tool generates a structured report with:
======================================================================
PRIVACY REVIEW REPORT
======================================================================
📁 CHECK 1: Sensitive Files in Git
----------------------------------------------------------------------
✅ No sensitive files committed
🔍 CHECK 2: Secrets in Committed Code
----------------------------------------------------------------------
❌ FOUND potential secrets:
- API key assignment: OPENAI_API_KEY="sk-abc123xyz..." (line 42)
🛡️ CHECK 3: .gitignore Protection
----------------------------------------------------------------------
✅ .env is protected by .gitignore
📄 CHECK 4: Local .env File
----------------------------------------------------------------------
⚠️ WARNING: .env exists with real credentials
Status: .env file exists locally but is NOT committed
======================================================================
SUMMARY
======================================================================
❌ Found 2 privacy concern(s)
Recommendations:
- Replace secrets with environment variable references
- Rotate any exposed credentials
- Ensure .env remains in .gitignore
======================================================================
If secrets are found in committed files:
# Remove specific file from all branches
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch file-with-secrets.py' HEAD
# Push cleaned history (requires force)
git push origin --force
Before:
DATABASE_URL="postgresql://user:password@host:5432/db"
API_KEY="sk-abc123xyz..."
After:
import os
DATABASE_URL = os.getenv("DATABASE_URL")
API_KEY = os.getenv("API_KEY")
Create .env.example:
DATABASE_URL=postgresql://user:password@localhost:5432/db
API_KEY=your-api-key-here
.env files with real credentials.pem, .key)os.getenv() for configuration.env.example with placeholdersSee PATTERNS.md for complete list of sensitive patterns:
.env always in .gitignoreThe tool may flag:
.env.example (safe)localhost or 127.0.0.1 (usually safe)Review these manually before taking action.
Binary files and large assets are skipped:
.png, .jpg, .gif)git filter-branch for historical scans)Add to GitHub Actions:
- name: Privacy Scan
run: |
python -m privacy_scan.scripts.privacy_scan --quiet
Extend privacy_scan.py with additional patterns:
# Add to patterns list in check_sensitive_patterns_in_content()
(r"custom_pattern", "Custom sensitive data"),
For files with known safe patterns (like test data):
# Modify scan_commit_for_secrets() to skip files
if "test_" in file_path.lower():
continue
development
Manages thinking patterns and mental models when switching between different topics or modes. Use when (1) switching from analysis to design, (2) switching from exploration to validation, (3) switching from reading to writing, (4) any topic transition where thinking approach must change, (5) user signals "we're going to sketch/design/build" after analysis phase.
development
Systematic codebase investigation producing structured exploration files (Notes → Facts → Claims). Use when researching unknown systems, tracing code paths, or documenting architecture.
testing
Collaborative design workflow for architecture and system design. Use when the user wants to design or redesign a system, component, or feature. Triggers on phrases like "design", "architecture", "how should we", "what's the best way to", or when the user asks for tradeoff analysis. This skill is for exploration and decision-making, not implementation.
development
Change plan workflow for non-trivial code changes. Create, review, and track changes before implementation.