Kingfisher: the scanner that catches the keys you thought you had deleted

Kingfisher: the scanner that catches the keys you thought you had deleted
What it does
A key that lands in a repository does not leave easily. You delete it from the file, you commit the deletion, and it is still there, in every earlier snapshot. This is not a rare accident: it is the ordinary way credentials leak, now that keys are copied by machines rather than people.
Kingfisher looks for exactly this. You hand it a folder and it scans it; you hand it a repository and it scans the history too, not just the current state. At its core it carries rules: patterns for the shape of a key, with confidence signals such as entropy — how random a string looks.
In my test it loaded 488 rules and ran with 8 parallel workers, with no config file and no exclusion list. The sensitive text comes out redacted, as “[REDACTED PRIVATE KEY]” or “ghp_16…8B4a”: it does not throw the key onto your screen or into its logs. A tool that shouts the secret to prove it found it has just spread it into your terminal.
Behind the program is MongoDB, which hosts it at github.com/mongodb/kingfisher. It is written in Rust, licensed Apache-2.0, and today it counts 1,272 stars and 122 forks, with the last code push on 20 October 2026. The latest release is v2.14.0, published that same day, and the Windows x64 archive is 22.0 MB with 342 downloads.
Who it is for
For anyone who commits: the developer who keeps an environment file next to the code, the maintainer who inherited a ten-year-old repository, and above all anyone who has put an AI assistant to work writing and committing on their behalf. An assistant copying an example out of documentation can copy the example’s key along with it — not out of malice, but because the key looked like the rest of the text.
It makes no sense for anyone who never touches credentials: a static blog, a demo project with no services. And it does not replace the first step after the damage: if a key leaked into a public repository, the right move is to revoke it with the provider. The scan is the second step.
Install
One route, a clean one. You download the Windows x64 release archive from github.com/mongodb/kingfisher/releases/download/v2.14.0/kingfisher-windows-x64.zip, unpack it wherever you like, and inside you find a single executable, kingfisher.exe. There is no installer, it does not touch the PATH, it needs no restart. I also tried the obvious thing, a winget package: there is none.
Then, from the folder you unpacked into, a check that the program answers — against an empty folder:
kingfisher scan .
It asked for no key, no account, no graphics card.
Using it per LLM
Kingfisher is not a tool of the engine. It grants the assistant no capability it did not have. It is a brake in front of the engine. Claude Code, Codex CLI and Cursor write code and commit on their own, once you allow it. A scanner running before that commit is the only thing that will catch the key the machine copied by mistake, at the moment it can still be caught for free.
That is why there is no “integration” here: there is one shell command and three ways to hang it on the workflow. The commands are real and I ran them in a shell. How each assistant makes use of them is my estimate, not a measurement inside an agent session.
When it finds something, it offers two follow-up commands: validate, which asks the provider whether the key is still live, and blast-radius, which I read from its name as showing how far the found key reaches — I did not run that one. validate makes a network call, which is why I deliberately passed --no-validate: I had no appetite for hitting real providers with fake keys. In public CI, --no-validate, always.
Claude Code
In Claude Code I see two places where it sits naturally. The first is the hook: the program runs commands at particular moments in its flow, and the moment before a change is submitted is the right one. A hook is nothing more than a command whose exit code decides whether the flow continues. Before you trust it, run it by hand and see what exit code it returns: I will not tell you “it blocks the commit”, because I have not seen it do that.
From the root of the repository:
kingfisher scan . --no-validate
The second route needs no setup: you ask the assistant to run it itself, mid-conversation.
kingfisher scan ./src --no-validate
Codex CLI
In Codex CLI the shell is the only route, with Codex’s own safety limits deciding what is allowed to run. There I would not use a hook, but rather the terminal workflow, at the point where you approve what gets committed: you ask Codex to write the change, you leave it uncommitted, and then you run the scanner yourself.
To scan a folder:
kingfisher scan ./src --no-validate
To scan a repository together with its history, which is the most useful thing it does:
kingfisher scan . --no-validate
Cursor
In Cursor I see it as a task before the commit. The agent has a terminal and runs the same commands, and the scanner lands at the point where you stop and look at what has happened. Because Cursor has its own task system, the command can be defined as a task that runs before the commit. I will not claim I set that task up: I ran the command in a shell, and the setup inside the program is the next step.
kingfisher scan . --no-validate
Where it wins, where it loses
It wins on the thing that matters most: it catches keys you thought you had deleted. In my test it scanned a repository and found, across 27 blobs — the content pieces Git keeps — and in the history, a token that had been deleted from the latest state. A tool that only looks at current files would never see it.
It wins because it asks nothing: no dependencies, telemetry or subscription. And because it redacts the sensitive text, you can leave its output in the logs. It even supports remote sources: GitHub, GitLab, Gitea, Bitbucket, Azure DevOps, Hugging Face, Slack, Microsoft Teams, Jira, Confluence, Postman, S3 storage, Google Cloud Storage, Azure Blob, plus Docker images. I write that as a capability and nothing more: I tested none of those sources.
Where it loses, in order of seriousness.
First, and I saw this with my own eyes: it does not catch whatever you put in front of it. I built a hand-made AWS-style credential pair, with an identifier starting AKIA. It did not flag it. I have no explanation and I will not hand you a fake one: a key with the right shape went under the scanner’s nose. Anyone resting on this tool alone is resting on a net with holes whose location they do not know.
Second, the 488 rules are not an inventory of reality. They are patterns, and patterns age. A key with a new shape that has not yet made it into the rules gets through. That is not Kingfisher’s failure: a secret scanner is always one step behind the providers.
Third, scanning history on a large repository wants care, because the tool reads everything that ever passed through and not what is there now. I did not measure it on a large project.
Testing
Everything below I ran today, 24 October 2026, on Windows 11, on a Dell Inspiron 3576 with an i5-8250U and 12 GB of memory, no graphics card, from inside Git Bash.
I downloaded the 22.0 MB archive, unpacked it, and inside there was one file, kingfisher.exe.
First test. I built a folder with a fake RSA private key and two fake tokens:
kingfisher scan ./test-secrets --no-validate
It loaded 488 rules and ran with 8 parallel workers, without me telling it either. It found two of the three. The key was flagged with high confidence and entropy 5.04, the GitHub token likewise with high confidence. The third, the hand-made AWS-style pair, was not flagged at all. In the output the sensitive text was redacted: the key as “[REDACTED PRIVATE KEY]”, the token as “ghp_16…8B4a”. I had nothing to clean up afterwards.
Second test, and the important one. I built a repository where a token existed in an earlier commit and had been deleted from the latest snapshot:
kingfisher scan ./repo-with-history --no-validate
It scanned 27 blobs along with the history, and found the token that had been deleted from the latest state.
I measured 70 milliseconds for two files, and I am not presenting that as a benchmark: two files say nothing.
What I did not test, plainly: remote sources, the platforms with tokens, performance on a large repository, and no agent session inside Claude Code, Codex CLI or Cursor. The commands above run in the shell, and that is what was tested.
What it costs
Money: nothing. The tool is free and open source, under the Apache-2.0 licence. No subscription, key or per-scan charge. Space: 22.0 MB to download, one executable after unpacking.
The real cost is time, of two kinds. The first is putting it into your workflow and keeping it there: a brake you use once is not a brake. The second is scanning history on large repositories, which reads everything that ever passed through. On a repository with years of work inside it you are talking about hours of computer time, not seconds. I did not measure it and I am not giving you a number.
Public numbers, with their source. 1,272 stars and 122 forks, last push on 20 October 2026. Release v2.14.0 was published on 20 October 2026 and the Windows x64 archive has 342 downloads — a small number, and I report it as it is. This is a tool held by a company rather than by a crowd of users, at least for now.
Verdict
Kingfisher does one thing almost nothing else in my workflow does: it looks at Git history, not just the current files. In my test it found a token that had been deleted, across 27 blobs. That is the kind of mistake a human does not find on their own and which a machine produces with ease.
My objections are specific. It did not flag the hand-made AWS-style pair — a fact, not an impression, and it means I do not trust it as my only net. The remote sources I know only from the documentation. And scanning history on a large repository asks for patience I have not measured.
Its place in my workflow is clear: right before the commit, especially when the commit is made by an assistant rather than by me. It is a brake in front of the engine. And you fit brakes before the corner.
Score: 8.5/10.
Sources: repository https://github.com/mongodb/kingfisher · documentation https://mongodb.github.io/kingfisher/ · installation guide https://mongodb.github.io/kingfisher/getting-started/installation/ · tool write-up https://appsecsanta.com/kingfisher