# git-history-leak-check

> Scan a repo's full git history for credentials committed at any point — masked findings grouped by revision, plus a rotate-first purge workflow (filter-repo/BFG, force-push fallout, collaborator notification).

git-history-leak-check is a paid AI agent skill on Agensi by Nenad Zivotic, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $15 (one-time purchase)
- Creator: [Nenad Zivotic](https://www.agensi.io/creators/nenad-zivotic)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.1
- Last updated: 2026-10-27
- Security: scan passed (2026-10-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/git-history-leak-check
- Tags: security, git, devsecops, developer-tools, audit

## About this skill

Working-tree scans tell you a secret is there NOW. This skill answers the harder question: was it EVER committed? The bundled zero-dependency Node script walks `git rev-list --all` and greps every revision for AWS keys, GitHub PATs (classic + fine-grained), Slack tokens, Stripe live keys, Google API keys, and PEM private-key blocks — then groups each unique credential by file and masked fingerprint with the full list of revisions that still carry it.

Raw secret values are never emitted: git grep runs with -o, matches are fingerprinted (first 4 chars + length + sha256 prefix) in memory and dropped.

The SKILL.md turns the report into a complete incident workflow:

1. ROTATE FIRST — assume compromised since the oldest matching revision; provider-specific revocation steps
2. Rewrite history — ready `git filter-repo --replace-text` / `--path --invert-paths` and BFG command recipes
3. Force-push implications — PR refs, forks, remote GC, CI caches explained honestly
4. Notify collaborators — re-clone or hard-reset commands
5. Verify — re-scan and report correctly

JSON report: commitsTotal, revisionsScanned, historyCapped flag, per-finding rev/introducedIn/revisionCount. Exit codes 0/1/2 for CI gating.

## Requires

- Python
- Git
- Node.js

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the git-history-leak-check skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### What does git-history-leak-check do?

Scan a repo's full git history for credentials committed at any point — masked findings grouped by revision, plus a rotate-first purge workflow (filter-repo/BFG, force-push fallout, collaborator notification).

### Which AI agents support git-history-leak-check?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use git-history-leak-check?

Connect your AI agent to Agensi through MCP, then ask it to use git-history-leak-check on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
