Developer builds open-source CLI tool to catch leaked API keys and broken env files
A developer has released envcheck, a zero-dependency Node.js CLI tool designed to prevent two common but costly mistakes: missing environment variables that crash production deployments, and API keys accidentally committed to code repositories. The tool validates .env files against a reference example or a JSON schema, flagging missing keys, duplicates, empty values, and unfilled placeholder defaults. It also recursively scans repositories for leaked secrets using pattern matching for known token formats — including AWS, Stripe, GitHub, and Google keys — as well as high-entropy strings that may represent unrecognized tokens. To reduce false positives, the scanner automatically skips node_modules, lockfiles, and minified files, and redacts matched secrets in its output so reports are safe to store as CI artifacts. The tool is designed for easy integration into CI pipelines via standard exit codes and works with systems like GitHub Actions.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in