# Secret Leakage Git History Scrubber

> Permanently purges committed credentials, API keys, and large blobs from git repository history using git-filter-repo. Use when remediating committed secrets ac

- Skill: `bishnucd/secret-leakage-git-history-scrubber` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx get-skill add bishnucd/secret-leakage-git-history-scrubber`
- Raw SKILL.md: https://api.skillmd.com/api/skills/bishnucd/secret-leakage-git-history-scrubber/raw
- Safety review: pending
- Works with: any agent that reads SKILL.md (Claude Code, Claude.ai, Cursor, Codex, Windsurf, 60+ more)
- Category: Coding & Dev Tools
- Author: Bishnucd (https://skillmd.com/u/bishnucd)
- Updated: 2026-12-02
- Page: https://skillmd.com/skills/bishnucd/secret-leakage-git-history-scrubber

---

---
name: secret-leakage-git-history-scrubber
description: Permanently purges committed credentials, API keys, and large blobs from git repository history using git-filter-repo. Use when remediating committed secrets across all historical commits.
license: MIT
metadata:
  author: Community List Maintainers
  version: "1.0.0"
  source: "https://github.com/newren/git-filter-repo"
---
# Secret Leakage Git History Scrubber

## Overview
Simply committing a deletion leaves secrets visible in git history. git-filter-repo rewrites historical commits, removing sensitive files and replacing compromised keys with dummy strings.

## Operational Workflow

1. **Create fresh bare mirror clone of the contaminated repository.**:
   - Create fresh bare mirror clone of the contaminated repository.

2. **Execute git-filter-repo --replace-text expressions.txt to sanitize secrets across all commits.**:
   - Execute git-filter-repo --replace-text expressions.txt to sanitize secrets across all commits.

3. **Purge reflog and force garbage collection using git gc --prune=now --aggressive.**:
   - Purge reflog and force garbage collection using git gc --prune=now --aggressive.

4. **Force push sanitized history to remote and instruct all collaborators to re-clone fresh copies.**:
   - Force push sanitized history to remote and instruct all collaborators to re-clone fresh copies.

## Recommended Tools & Environments
- git-filter-repo
- Git Internals
- Secret Remediation
- Python

## Verification & Execution Criteria
- Pre-execution validation verifies all prerequisites and inputs.
- Step-by-step progress logging confirms intermediate state transitions.
- Post-execution checks verify output integrity and clean exit codes.

