Build Your Own Secret-Scanning Bot in Node.js — Git History Included
Delete a token from config.env and a scan of the working tree comes back clean. The token is still in Git history, one git log -p away from anyone who clones the repo. Off-the-shelf scanners usually make you pick a workflow, an output format, and a place for the results to go. When you embed the scanner, you make those choices.
The kingfisher-secret-scanner npm package runs the Kingfisher Rust engine in-process through Node-API. It reads Git objects directly, with no git binary required. It streams typed findings as each file finishes. It can ask providers whether a leaked key still works. Native work runs off the event loop, so a bot or web service keeps handling requests while it scans. It supports ESM and CommonJS and ships TypeScript declarations. Get it on npm.