Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Secret Scan: Find Leaked Keys in Your Git History

    1

    Deleting a key in a later commit does not remove it.

    Free

    Security scanned
    Secret Scan: Find Leaked Keys in Your Git History

    Secret Scan: Find Leaked Keys in Your Git History

    Example session with this skill installed

    I am about to make this repo public. Check the whole history for leaked keys first.

    • Read your context and instructions
    • Compiled the secret scan

    A real run on a real repository.

    Scanned

    27 commits (16,612 added lines) and 108 files in the working tree.

    History

    Clean. No key, token or password in any known format was ever committed.

    Working tree

    TypeFileIn historyStill in filesValue
    AI provider key.envnoyesgsk_... (56 chars)

    .env is listed in .gitignore, so it is not tracked and will not be published. That is the right place for a key; nothing needs rotating.

    Verdict

    Safe to make public as far as a pattern scan can tell: it checks known key formats and hard-coded credentials, and cannot prove that nothing in an unusual format was leaked.

    I wrote the history export outside the repository and deleted it after the scan.

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

    About this skill

    Deleting a key in a later commit does not remove it. It stays in the history for anyone who clones the repository. Secret Scan reads the whole history and the current files and tells you what leaked and what to do first.

    What it does

    • Scans every commit, not just the latest files: keys that were added and later deleted are found.
    • Scans the working tree and puts leaks that are still in your files first.
    • Knows the common formats: AWS, GitHub, Stripe, Slack, Google, AI provider keys, private key blocks, JSON web tokens, passwords inside URLs, and hard-coded assignments such as db_password.
    • Ignores placeholders like your_key_here and ${VAR}, so the report is short enough to act on.
    • Masks every value: only the first 4 characters and the length are shown, so the report itself never leaks anything.
    • Tells you the order of work: rotate first, remove from the files second, rewrite history only if you choose to.

    Why it is different

    • Local only. One small script with no network code. It never runs git and never sends your code anywhere.
    • Open source (MIT), so you can read exactly what it does before you trust it with your history.
    • Deterministic. The same history gives the same report, with file and commit for every finding.

    Limits

    • A pattern scan cannot prove nothing was leaked; a secret in an unusual format can be missed.
    • Binary files and files over 1 MB are skipped.
    • It reads what you export: if the export covers one branch, only that branch is checked.
    • Needs Python 3.8+, git and an agent with a terminal.

    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.

    Misses unusual secret formats. Skips binary files and files over 1MB. Does not scan submodules. Only as thorough as the Git history export provided.

    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 5 days ago

    • Free with an Agensi account

    Software
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files

    Files: secretscan.py reads the history export you create and the folder you name. It writes nothing, contains no network code and never runs git; your agent runs one git log command to create the export.

    Listed5 days ago

    What's inside

    Frequently Asked Questions

    No. The script has no network code. It reads the history export you create and the folder you name, and prints a report.

    Yes. It reads every commit, so a key that was added and removed later is still found. That is the reason to scan history and not only the current files.

    No. Every value is masked to its first 4 characters and its length.

    Rotate or revoke the key first: anything ever pushed is leaked. Then remove it from your files. Rewriting history is optional and never replaces rotating.

    Yes. It is a pattern scan for common key formats and hard-coded credentials. A secret in an unusual format can be missed, and a clean result is not proof.

    New in Security

    Free