DEV Community

Cover image for Iam 12 .I Built an Enterprise AI Security Tool on a $150 Phone (And My Own Code Locked Me Out)
Harun - solo dev
Harun - solo dev

Posted on

Iam 12 .I Built an Enterprise AI Security Tool on a $150 Phone (And My Own Code Locked Me Out)

AI coding agents (Cursor, Claude Code, Devin) are getting terrifyingly powerful. They can write code, deploy servers, and run terminal commands autonomously.

But I realized something chilling: They can also hallucinate.

If an AI agent gets confused and tries to read my .env file, exfiltrate my database, or run rm -rf /, it will just do it. There is no "Are you sure?" prompt for a machine.

So, my co-founder Akhouri and I built KAVLRβ€”an enterprise-grade "Agent Leash" to stop AI agents from destroying production environments.

Oh, and we didn't have MacBooks. We didn't have VC funding. We built it entirely on a $150 Android phone using Termux.

The Architecture: Fail-Closed at the Edge

KAVLR uses a Bash hook that intercepts commands before the OS executes them. It sends the payload to a Supabase Edge Function (Deno) which checks it against your security policies.

The most important design choice? It is Fail-Closed.
If the API request fails, the network drops, or the server times out, KAVLR blocks the command. It defaults to safety. Always.

The Mutiny (When the Leash Bites Back)

This Fail-Closed design worked a little too well.

One day, my local server went offline. I tried to fix the code, so I typed cat index.js to look at the file.
πŸ›‘ KAVLR blocked me from reading my own code.

I tried to delete the broken file using rm.
πŸ›‘ KAVLR blocked that too.

My own creation had mutinied. It had locked me out of my own terminal. I literally had to open a new session and write a Python script just to bypass the security I had built. I was laughing and crying at the same time. That’s when I knew the architecture was bulletproof.

The Cloud Wars (Despair)

Running it locally was easy. Putting it on the internet almost broke me.

I tried Vercel. 502 Bad Gateway.
I tried Railway. Deployment Timeout.

I spent hours staring at error screens on my 4G connection. I remember sitting in the dark, frustrated, with my phone at 5% battery. I thought, "Maybe this is too hard for a kid on a phone." The giants like Palo Alto Networks are raising millions for this exact idea. I felt like David facing Goliath, but Goliath had infinite cloud credits.

The Edge Epiphany

I was ready to quit. I told myself I would just publish this DEV post with the local code and apologize that the cloud didn't work.

Then, I looked at the tab I had open: Supabase Edge Functions.
The same database I was already using. The same dashboard. I realized, "Wait. They host code now."

I deleted the Node.js backend. I wrote a single Deno script directly in the browser on my phone. I clicked deploy.

I went back to Termux. I exported my API key. I typed cat .env.

And then I saw it.
πŸ›‘ [BLOCKED] THREAT DETECTED.

It worked. It was on the internet. It was running on Supabase's global edge network. There were no ports to bind. No Railway crashes. No Vercel timeouts. It was just... working.

The Reality of the Market

We aren't just building this for fun. The data is terrifying:

  • 88.4% of organizations using AI agents have reported a security breach.
  • 79% of enterprises have zero runtime visibility into what their agents are doing.
  • 2,000+ AI-related CVEs were tracked in the last 18 months.

Enterprise tools are built for massive corporations with huge budgets. KAVLR is built for the solo developer, the indie hacker, and the small team. It’s free, it’s lightweight, and it requires zero configuration.

⚑ Quick Start: Leash Your Agent in 60 Seconds

Want to try it? Here is the TL;DR of our Installation & Survival Guide:

  1. Get Key: Generate your API key at kavlr.netlify.app.
  2. Install: Run npm install -g @hynaweb/kavlr
  3. Arm: Run kavlr init and paste your key.
  4. Test: Try running cat .env. Watch KAVLR block it instantly. (Pro Tip: Because it's Fail-Closed, if you ever need to bypass it for debugging, just put a backslash before your command: \cat .env. We aren't monsters).

πŸ‘‰ **Read the full Installation & Survival Guide here : https://blue-moon-248.linkyhost.com

Try It Yourself

The dashboard is live: https://kavlr.netlify.app/

To the kids out there building on their phones: Don't stop.
The cloud will fight you. The ports will break. Your own security system might lock you out. But when you finally see that red "BLOCKED" message hit the global edge, it is the best feeling in the world.

We are HYNAWEB. We build the future of development. And we are just getting started. πŸ―πŸ›‘οΈπŸš€

Top comments (2)

Collapse
 
forkcount profile image
forkcount •

That reminds me. I must update the security on ForkCount. Never give up. I was stuck 5 days on two bugs. I never gave up. Github wasn't publishing my app, and then another time the account data wasn't going to Firestore. And that took another 2 days.
The point never give up.

Collapse
 
akhourianmolkumar profile image
Akhouri Anmol Kumar •