What problem does it solve?
This Skill helps teams identify and remove sensitive information such as API keys, tokens, passwords, and private keys from both the working tree and the git history to prevent credential exposure, prepare repositories for public release, and meet security compliance requirements.
Core Features & Use Cases
- Comprehensive detection: Pattern-based, file-type, and entropy analysis to find likely secrets across text and binary files.
- Safe working-directory sanitization: Replace secrets with consistent placeholders, validate file syntax, and preserve file integrity.
- History rewriting options: Guidance for using BFG, git filter-repo, or git filter-branch to remove secrets from commit history and coordinate force-push and re-cloning.
- Use Case: A developer preparing a private repository for open-source release can scan for leaked credentials, replace them with placeholders, rewrite history to remove commits containing secrets, and then instruct the team to rotate exposed credentials.
Quick Start
Use the sanitize-git-repo skill to scan your repository for secrets, replace exposed values with standardized placeholders, and rewrite git history using BFG or git filter-repo while coordinating credential rotation.