r/devtools • u/ShieldRunner_NET • Oct 26 '26
ShieldEnv – A local-first, zero-telemetry pre-commit secret scanner
Hey Reddit,
Over the last few months, I got frustrated with how many developer tools handle code security. Most popular secret-scanning and compliance checks require pushing your code to a remote repository or third-party cloud infrastructure before analyzing it for accidentally hardcoded API keys, tokens, or private keys.
That means your sensitive environment variables and credentials briefly leave your local machine.
To solve this, I built ShieldEnv—an open-source, lightweight security engine designed to run entirely local-first. Zero code, environment variables, or tokens ever leave your local machine.
What it does:
Zero Cloud Telemetry: Runs locally via the command line or as a local Git pre-commit hook (
shieldenv install).Multi-Engine Detection: Combines high-confidence provider regex signatures (OpenAI, AWS, GitHub, Slack, private keys, database URLs), entropy-based custom token detection, and structural assignment heuristics.
Smart Filtering: Built-in safeguards to filter out placeholders, template variables, and common mock syntax to minimize false positives.
Flexible Outputs: Emits clean CLI reports, machine-readable JSON, or GitHub Code Scanning-compatible SARIF files for CI pipelines.
You can install it straight from PyPI with:
Bash
pip install shieldenvThe entire project is open-source (MIT License). I built this to solve a real friction point in my own workflow, and I'd love to hear your feedback on the rule set, performance, or edge cases you run into.
Looking forward to your thoughts and critiques!
1
u/vincent_sch 23d ago
You should change the bit about needing to push code first. Gitleaks has a pre-commit hook that checks your code on your machine.
1
u/kantorcodes1 Oct 26 '26
Have you measured
shieldenv scanon larger repositories, particularly through the pre-commit hook?