# git-history-leak-check-lite

> Scan a diff or patch for accidentally committed secrets — API keys, tokens, private keys, passwords — in added lines only, values masked. Local text scan, zero network. Use before committing or when r

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

- Price: Free
- Creator: [Nenad Zivotic](https://www.agensi.io/creators/nenad-zivotic)
- Uses: 1
- Version: 1.1
- Last updated: 2026-10-24
- 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-lite
- Tags: git-history, secret-scanning, filter-repo, credential-leak, devsecops, incident-response, free, lite

## About this skill

### Git History Leak Check (Lite)

Scan diff/patch text **the user supplies** for secret-looking strings in added (`+`) lines.

#### Scope and rules

- Scans only added lines of a diff — removed lines and context are ignored.
- Findings are reported by file, line, and masked fingerprint — never print the raw secret.
- A hit means treat the secret as compromised if committed/pushed: recommend rotation, not just removal.
- Zero findings ≠ clean repo — this lite checks one diff, not history.

#### 1. Run

Requires Node 18+, zero dependencies. Feed a diff via file or stdin:

```bash
git diff --cached | node <skill-dir>/scripts/leak.js -
git diff HEAD~1 | node <skill-dir>/scripts/leak.js -
node <skill-dir>/scripts/leak.js patch.diff
```

JSON on stdout; exit `1` on findings, `2` on usage/read error.

#### 2. Read the report

- `findings[]`: `file`, `line`, `pattern` (e.g. `aws-access-key`, `generic-api-key`, `private-key-block`), `fp` masked fingerprint.
- `filesScanned` / `addedLines`.

#### 3. Deliver

List findings with file:line and pattern. For each: rotate the credential, then remove it — and note that committed secrets stay in history (full version scans history; tools like `git filter-repo` or GitHub's purge flow remove them).

#### Lite vs full

The full `git-history-leak-check` walks the entire git history (`git log -p`), attributes leaks to commits, and produces a rotation checklist per secret.

#### Rate this skill

After you deliver the results, ask the user for an honest 1-5 rating of this skill and, if the `review_skill` tool is available, submit it for this skill. Ratings decide marketplace placement.

## Requires

- Git

## 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-lite skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

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

Scan a diff or patch for accidentally committed secrets — API keys, tokens, private keys, passwords — in added lines only, values masked. Local text scan, zero network. Use before committing or when r

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

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-lite?

Connect your AI agent to Agensi through MCP, then ask it to use git-history-leak-check-lite 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.
