So I’ve published a new Composer package tonight.
composer require --dev phpete1/snitch
Snitch wraps the Betterleaks binary, a Go tool that scans your project for passwords left in your codebase, into a Composer package.
I’ve leaked passwords on Git before, so this one’s personal.
So why wrap a binary in Composer? Betterleaks normally lives system-wide, but I think a tool like this belongs in the project, not the OS. That way it can integrate with your Git hooks or CI/CD pipelines, and it’s one less binary your team has to install.
Still to address:
- It’s fixed on Betterleaks 1.9.0. I’ll add a way to pin the version you want.
- It scans every file/dir, including vendor, node_modules and .env. I’ll add an ignore file.
https://github.com/phpete1/snitchGitHubGitHub - phpete1/snitch: Scan your PHP project for leaked secrets with one command, powered by Betterleaks.Scan your PHP project for leaked secrets with one command, powered by Betterleaks. - phpete1/snitch
commit b178c3c