Works with the AI Agents you already use
Secret Scan: Find Leaked Keys in Your Git History
Deleting a key in a later commit does not remove it.
Free
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
| Type | File | In history | Still in files | Value |
|---|---|---|---|---|
| AI provider key | .env | no | yes | gsk_... (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_hereand${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.
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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
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 forever
No account required to browse
Trust & safety
Security scan
Security scan passed 5 days ago
- Free with an Agensi account
Requires
Permissions
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.