AI-generated app security

AI-generated code is not insecure because the model writes bad code. It's insecure because security lives in the relationships between pieces of code, and each piece was generated without knowledge of the others. The same few vulnerabilities show up over and over.

The recurring four

In roughly the order they turn up when someone reads an AI-built codebase for the first time.

  1. 01

    Missing ownership checks

    Every endpoint verifies that you're logged in. Very few verify that the record you asked for belongs to you. Incrementing an ID in a URL is all it takes to find out.

  2. 02

    Secrets that reached the client or the repository

    An API key in a frontend bundle is public regardless of what it's named. A key committed once stays in git history even after the file is deleted — and history is what gets cloned.

  3. 03

    Validation only on the client

    Client-side validation is a convenience for honest users. Anyone can post directly to your API, and generated backends frequently trust whatever arrives.

  4. 04

    Trusting values the client controls

    Prices, roles, quantities and user IDs read from the request body rather than from the session. If the browser can set it, treat it as hostile.

Checks you can run today

None of these require a security background.

  • Log in as user A, request a record belonging to user B, see what comes back
  • Search your built output for "secret", "api_key" and "sk_live"
  • Run git log --all -- .env to see whether an env file was ever committed
  • Post to your API directly, bypassing the form, with a value the UI wouldn't allow
  • Change a price or a role in a request body and see whether the server accepts it
  • Confirm password reset tokens expire, and can only be used once

What a review here is, and isn't

This is an engineering security review: someone reading your code and your configuration for the categories of mistake that actually cause incidents at your stage. It's the right thing for most small teams and pre-launch products.

It is not a certified penetration test, and it isn't a compliance audit. If you need SOC 2, ISO 27001, or a signed pen-test report for a customer, you need a specialist firm — and I'd rather tell you that plainly than sell you something adjacent.

Common questions

Can you review security?

Yes, as an engineering review rather than a formal audit or certification. I look at authentication, authorization, exposed secrets, input handling, dependency risk and what your deployment leaves open. If you need a certified penetration test, I’ll tell you that instead of pretending otherwise.

Can you review AI-generated code before launch?

Yes, and it’s a good moment to ask. A pre-launch review covers architecture, security, performance, dependencies and maintainability, and comes back as a prioritized list rather than a wall of comments.

Can you fix production bugs?

Yes. If something is broken for real users right now, say so when you get in touch and I’ll treat it accordingly. I’ll want access to logs and the deployment, not just the code.

The service

AI Code Review

The code works. That's a different question from whether it's safe to put in front of users, and a different question again from whether you'll be able to change it in six months.

Further reading

Your AI-built app doesn’t need another prompt.

Sometimes it needs an engineer.

Send the messy version. That’s usually the useful version.

Show me what’s stuck.

Don’t spend another six hours fighting the same bug. Send me what you’ve got — the messy version is usually the useful version.

Both open with a short template already filled in.