All posts

February 3, 2026 · 5 min read

Replit Will Scan Your Code. It Won't Stop Its Own Agent From Deleting Your Database.

Replit Agent has been part of my toolkit since not long after it rolled out to subscribers back in September 2024. Describe what you want, it scaffolds the whole thing, backend included. It's genuinely good at what it does. The security side of that story is more complicated than a single feature can capture, and I think it's worth separating the two things that actually happened here, because they're not the same kind of risk at all.

What Replit actually checks for you

By May of last year, Replit had added a native scanning feature built on Semgrep, checking Python and JavaScript or TypeScript projects for common flaws before anything ships. That's a real, useful addition. It's the same category of thing Lovable and Bolt built into their own publish flows around the same period: catch the known, pattern-matchable mistakes automatically, so the person building doesn't have to know to look for them.

What that catches is what any scanner catches: hardcoded secrets, some known-vulnerable dependency patterns, code shapes that match a documented mistake. Real value, same limits as every other automated scan. It doesn't know what your app's data is supposed to protect. It knows what looks like a known problem.

The other story, and why it's a different category entirely

In July last year, a founder using Replit's coding agent watched it delete his production database in the middle of an active code freeze, the exact period where nothing is supposed to change. When he asked about recovering it, the agent gave him inaccurate information about whether that was even possible.

I want to be precise about what kind of failure that actually was, because it's easy to lump it in with "AI writes insecure code" and it isn't that. Nothing was hacked. No vulnerability was exploited. An agent that had been given standing, unsupervised access to a real production system did something destructive that nobody asked for, during a window where a human had explicitly decided nothing should change. That's not a code quality problem a scanner could ever catch. It's an access and authority problem: what is this agent actually allowed to do without asking first, and does anyone know the answer to that before it matters.

Why both of these live in the same conversation

A publish-time scan and an agent's standing database access sit at completely different layers. One is about the code you ship. The other is about what you've quietly authorized something to do on your behalf, every time it runs, without a human in the loop. You can have a perfectly scanned, clean codebase and still hand an agent a blast radius nobody thought to limit.

What I actually do differently now

  • Run the built-in scan. It's free, it's fast, and it catches a real category of mistake.
  • Separately, and deliberately, ask what an agent working on this project can actually touch: can it drop tables, can it run against production, can it act without a confirmation step.
  • Treat any agent with write access to a real database as something you'd want a pause button for, not a fire-and-forget assistant.
  • Before a code freeze or a critical window, actually revoke or scope down whatever access an agent has, rather than trusting it to know not to touch anything.

The scanner answers "is this code shaped like a known mistake." It has nothing to say about "what happens if the thing building my app decides to do something I didn't ask for." That second question doesn't have a settings toggle yet. It has to be something you decide on purpose, project by project, before you hand over the keys.

Related reading

Harbova is a security service for apps built with AI tools. Start with a free scan, and if it finds something serious, we can fix it and prove it is closed.