Git Secret Leak Scan (Zero Plaintext)

    by Drizzt Studio

    1

    Find leaked credentials in git repos without printing the secrets themselves.

    Free

    Security scanned

    Works with the AI Agents you already use

    Git Secret Leak Scan (Zero Plaintext)

    Example session with this skill installed

    Run a secret scan on the cloned 'web-app' directory and save the results to report.json. Report hits as file, line, category and length only. Then walk me through the documented manual follow-up — how to check whether a DeepSeek key is still active, and how to purge the file from history on Windows.

    • Read your context and instructions
    • Compiled the git secret leak

    Demo result (illustrative; the repository and its contents are synthetic):
    [web-app] tracked=142 scanned=138 skipped=4 env=0 db=1 sens=0 hits=1 remote_token=- reconciles=ok

    • config/services.py:42 [deepseek/openai-key] (len=48)
    • internal/db.sqlite → listed in db_tracked (path only; not opened by the scanner)
      JSON shows one finding, file/line/category/length only — the matched string is never printed: {"file":"config/services.py","line":42,"type":"deepseek/openai-key","length":48}
      Manual follow-up, not performed by the scanner: check whether the DeepSeek key is still active with GET https://api.deepseek.com/user/balance (200 = still valid, rotate now), and run the documented sqlite3 query yourself to count rows before judging the exposure. If remediation is needed, follow the documented WSL2 + git-filter-repo steps: rewrite history, resolve the real default branch with gh repo view and push --force to it, delete leftover remote backup branches, then re-clone into a fresh directory and confirm git log --all -- <path> returns nothing.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A defensive audit skill for checking your own repositories before they go public, or after you suspect a leak. The bundled scanner reports file, line, category, and match length only — never the secret string. It does not make network calls. The write-up also explains optional, manual live-key checks and self-revocation against provider APIs, plus Windows/WSL2 history cleanup with git-filter-repo and a force-push. Use those steps only on accounts and keys you are authorised to operate.

    Text scanning skips every binary file, including SQLite databases; those are reported by path only, so you must inspect them yourself. History cleaning on Windows requires WSL2. Remote history removal also requires manually deleting orphaned backup branches, and the default branch name must be resolved before force-pushing.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free to use

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 16 days ago

    • Free with an Agensi account

    Software
    Python 3 (standard library only)Git
    Optional
    gh (GitHub Trees API inventory)WSL2 with git_filter_repo.py (Windows history rewrite)

    Offline scanner: one Python script, no network calls. Everything else — GitHub Trees API inventory, SQLite row counts, live-key status checks, WSL2 history rewrite and force-push — is documented manual steps you run and authorise yourself. No history-purging script is included.

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables
    Listed16 days ago

    What's inside

    Frequently Asked Questions

    The bundled scanner never prints a matched string — findings carry file, line, category and match length only, and patterns are matched at full length so a short prefix cannot leak. This guarantee covers the scanner's own output. The optional live-key checks described in the skill mean you handle the key value yourself, so treat those runs like any other command that carries a credential.

    The documented route runs git-filter-repo through WSL2, because running it natively on Windows fails during fast-export (OSError: Errno 22) and git filter-branch breaks on MSYS path conversion. WSL2 is therefore required on Windows; the same single-file git_filter_repo.py can be run directly on Linux or macOS. Either way you must re-clone the repository and verify afterwards.

    Yes, by hand. The skill documents gh api commands that list a repository's file tree through the GitHub Trees API, so you can spot tracked .env, *.db and *.pem files before cloning anything. It returns file paths only, never file contents, and typically takes tens of seconds for dozens of repositories. This is a documented manual step, not an automated script in the package.

    The scanner only finds strings. Checking whether a key is live is a manual follow-up documented in the skill: you issue read-only requests such as GET /user/balance (DeepSeek), GET /user (GitHub) or GET /v3/user/account (SendGrid) and read only the HTTP status code — 200 means still valid, 401 means revoked.

    You receive one Python script (scripts/scan_repos_secrets.py) for local, offline secret scanning, plus a SKILL.md that documents the manual workflows: a GitHub Trees API file inventory, manual SQLite row-count checks, optional live-key verification and self-revocation, and WSL2-based history rewriting with git-filter-repo. History purging is not shipped as a script — you run the documented commands yourself.

    No. The scanner skips any file that contains null bytes in its first 4096 bytes, so binaries and encrypted blobs are never read. SQLite databases are reported by path only — the skill documents a manual sqlite3 command you run yourself to count rows per table and judge the exposure.

    New in Security

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.

    Free