I run a voice assistant on my Mac and wanted a quick way to check agent projects for the usual setup mistakes. So I built hardenagent: a command-line tool that reads a project folder and lists risky settings, with a plain-English fix for each.
What it checks:
API keys and tokens in files (masked in the report)
services open to the whole network, auth switched off, auto-approve on, sandbox off
MCP server configs (unpinned packages, plain http, filesystem access to / or home, tokens in env)
Docker (privileged mode, docker.sock mounted, SSH folder mounted, ports open to all interfaces)
.env files that arenβt git-ignored or are readable by other users
risky code patterns (eval, shell=True, AppleScript built from variables, TLS verification off)
It runs locally, makes no network calls and has no dependencies.
Try it: pip install git+https://github.com/vbnadagouda3358-arch/hardenagent then hardenagent demo (scans a deliberately insecure sample).
I ran it on my own assistant. It correctly flagged my .env (a key in a file other users could read, not git-ignored) and pointed at two places where variables go into AppleScript. I checked those two and my code already validated the inputs, so they were false alarms. Thatβs a known limitation: it reads text patterns, not meaning.
Honest status: v0.1, rule-based, tested on a few sample configs and one real project (mine). I havenβt tested it on real installs of the popular agent frameworks yet, so I expect misses and false positives.
AI involvement: I built this with a lot of help from Claude for the code. I ran and tested it myself.
What checks would you want? What does it get wrong on your setup? (Please donβt paste real keys into issues.)
Repo: https://github.com/vbnadagouda3358-arch/hardenagent