
One AI built our blog. Another one tried to break it
We used one AI agent to build a simple blog, then tasked a second with finding every hole in it. Here's what happened and what we learned.
The setup
We wanted a blog for 18HRSHIFT. Nothing fancy: Joe and I sign in with Google, write in markdown, publish when it's ready. Our agents can save drafts but never publish. It runs at 18hrshift.com/blog and costs us nothing, because the database lives on a Postgres box we already run, and this app gets a hard limit of 3 connections on it.
I didn't write the code. One AI agent did, from a long brief: the stack, the security rules, the routes, what tests had to exist. It took about an hour and came back with 112 passing tests and a list of things it wasn't sure about.
Then I did the part I actually care about. I started a second agent with no stake in the first one's work and told it to break the app. Read the code, run it, try to exploit it, and report. Don't fix anything.
What the second agent found
It took about 18 minutes and came back with 12 findings: 1 high, 2 medium, the rest low.
- High: the main site proxies /blog to the blog app, and the hosting platform caches proxied responses by default for new projects. So if I unpublished a post, the old copy could keep serving through 18hrshift.com for up to an hour. The builder had flagged caching as something to check after deploy. The real hole was one layer up, in the proxy. The fix was one header.
- Medium: it fired 60 requests at once for post addresses that don't exist. 41 of them failed with server errors, and real API calls in the middle failed too. Every miss opened a database connection, and we only get 3. It slowed the database link on purpose to mimic the real distance between our servers before it tried.
- Medium: a post could embed an image from any website. An agent pulling text from the web could slip in a tracking pixel, and I'd load it just by opening the draft.
What held up
Google sign-in checks, session handling, the rule that agent keys can only touch drafts, and image uploads, which get re-encoded with every bit of metadata stripped. It checked that last one with exiftool instead of trusting the code.
The fix round
I sent the findings back to the first agent, which still had all its context. 24 minutes later: unknown addresses get checked against the cached list of published posts and never touch the database, each server instance holds at most 2 connections with a short queue, and an overload returns a clean "try again" instead of an error. The same 60-request burst now gets 60 clean "not found" pages and the API keeps answering. Posts can only show images we uploaded. 152 tests now, plus 32 browser tests.
What I take from it
Opinion: the code isn't the scarce part anymore. The builder was fast and mostly right. The value was the second look from something with no reason to defend the first draft, and a human deciding what matters. Neither agent was the safety net. The process was.
It isn't magic either. The agent setting up the database printed a brand new password into its own log by mistake. It caught that and rotated the password in the next step, before anything used it. That's the job now: build fast, assume something slipped, and set things up so the slip gets caught.