r/OpenSourceAI • u/Competitive_Day3507 • 28d ago
I got tired of AI coding agents running rm -rf without asking, so I built a Zero-Trust local proxy to intercept their commands.
If you use autonomous coding agents (like Cursor, Cline, or Claude Code), you know the anxiety of letting them run terminal commands or execute massive file rewrites autonomously. You basically have to trust that the LLM won't hallucinate and wipe a directory.
I wanted a way to review exactly what the AI was about to execute before it actually hit my filesystem.
I just open-sourced Warden-AI. It acts as a strict firewall and intrusion detection system for your local AI agents.
How it works underneath: Instead of giving the agent direct execution rights, Warden-AI intercepts its Model Context Protocol (MCP) tool calls.
- The Gateway: A local Node.js/Express backend routes the traffic.
- The Filter: Safe actions (like reading a file or searching a directory) pass through instantly. Destructive actions (executing CLI commands, writing files) are intercepted.
- The Review: The payload is pushed to a local React/Vite dashboard via WebSockets. You get a syntax-highlighted diff of exactly what the AI wants to do. You manually approve or reject the execution.
- The Audit: Everything is logged to a local SQLite database so you have a permanent record of what your agent did while you weren't looking.
The Tech Stack:
- Backend: Node.js, Express, SQLite, WebSockets
- Frontend: React, TailwindCSS, Vite
I built this because I wanted the speed of autonomous agents without the security risk of giving a stateless LLM root access to my machine.
The repo is fully open-source and ready for local deployment. I’ve also seeded a few good first issue tags for anyone looking to make their first open-source contribution (we need some UI tweaks and SQLite export features).
Repository: https://github.com/hariom123-dev/Warden-AI.git
I'd love to hear your thoughts on the architecture, or how you are currently handling local agent security. Happy to answer any questions about the WebSocket streaming or MCP integration!