Vibe Code Guardian
← All posts

Can AI Audit Its Own Code? What a Self-Review Catches and What It Misses

Asking the same AI that built your app to check it for security problems is cheap and worth doing. Here is what that review reliably finds, where it goes quiet, and when you need a person.

Aaron Allen·

A common move after finishing a vibe coded app is to paste a message into the same chat that built it: "Review this app for security problems and fix anything you find." It feels sensible. The tool wrote the code, so it should know where the weak spots are.

It is a worthwhile thing to do, and you should do it. It is also not an audit, and the gap between the two is where launch-day surprises live.

What an AI review is genuinely good at

Give a modern coding assistant your code and ask it to look for problems, and it will usually find a decent list. The things it catches best are the ones that look wrong on the page.

A secret key written straight into a source file. A SQL query built by gluing user input into a string. A form that accepts any file type. A console.log that prints a whole user object. Packages that are several years out of date. An endpoint with no input validation at all. These are pattern problems, and pattern recognition is what these models do well.

It is also quick and costs almost nothing, so you can run it after every big change. That matters, because the habit of checking regularly is worth more than one thorough check you do once.

Where it goes quiet

The trouble starts with what the review cannot see.

It only reviews what you showed it. Paste in three files and it reviews three files. Row level security rules, storage bucket settings, your hosting dashboard, the environment variables set on the live server and the permissions on your payment provider account are not in your code, so they are not in the review. Several of the most damaging problems in AI-built apps sit in exactly those places. We see apps where the code is tidy and the database behind it is open to anyone with the public key.

It tests nothing. Reading code and running an app are different activities. A review can say "this endpoint should check ownership", but it will not log in as user B and try to open user A's invoice. The bugs that depend on how the whole system behaves, like one customer seeing another's data, mostly only appear when someone tries it.

It shares the blind spots of the tool that wrote the code. If the assistant believed a pattern was fine when it wrote it, there is a fair chance it believes the same thing when it reads it back. You are asking one opinion twice. A second pair of eyes is valuable partly because it is a different pair.

It tends to agree with you. If your prompt is "check this is secure", you will often get a reassuring answer with a short list of minor points. Ask the question as "assume this app has a serious flaw, find it" and the output changes noticeably. The answer you get depends a lot on how you ask, and a result that changes with the wording is a poor basis for deciding to put real customers on the app.

It can fix the symptom and lose the point. We have seen this repeatedly. A review flags a permissions error, the tool "fixes" it, and the fix is to loosen the check so the error stops appearing. The report says resolved. The hole is wider than before.

A better way to run a self-review

Used well, it is a strong first pass. A few habits make it much more useful.

Ask for specific areas in separate rounds rather than one giant request. "Review only authentication and sessions" gets more depth than "review everything". Do another round for secrets and environment variables, another for anything that touches payments, and another for how user input is handled.

Tell it to be adversarial. Phrases like "you are a penetration tester trying to read another user's data, list the ways you would do it" work better than a request for a general review.

Ask it what it could not check. A good response will admit that it cannot see your database policies or live configuration. If it does not volunteer that, ask directly: "what parts of this system were you unable to verify from the code alone?" That list is your to-do list for the next stage.

Use a different model or tool for the review than the one that wrote the code, if you can. It will not remove the shared blind spots, but it shrinks them.

Then, and this is the step people skip, test anything it flags after the fix. Log in as two accounts. Call the endpoint without a login. Look at the live site's code in your browser. If the problem cannot be reproduced any more, good. If you are only trusting the explanation, you have not finished.

What a human audit adds

A developer reviewing an app brings three things an AI self-review does not.

The first is access to the whole system. They look at the code, but also the database rules, the hosting setup, the secrets, the third-party accounts and the way they all connect. Most real problems sit at the joins between those pieces.

The second is that they try to break it. They sign in as different users, replay requests, change IDs and send things the interface would never let you send. That finds the class of bug that a read-through cannot.

The third is judgement about what matters. An AI review of a small app can return forty findings of equal apparent importance. A person can tell you that two of them must be fixed before Friday, six can wait a month, and the rest are noise for an app at your stage. Without that ranking, founders either panic or ignore the lot.

That is the idea behind Vibe Code Guardian's launch-readiness audit. A developer works through your app against 137 points across 14 areas, confirms each finding by hand, and gives you a readiness score with a ranked list of fixes. It is meant to be read by someone who did not write the code and does not want to learn security vocabulary to understand it.

So which do you need?

Run the AI review whatever else you do. For a prototype, an internal tool or an app with a handful of friendly testers and nothing sensitive in it, a careful self-review plus the manual tests above may be all you need for now.

The balance shifts once any of these are true: you are storing other people's personal data, you are taking payments, you have paying customers who would leave if something went wrong, or you are about to put money into marketing the app. At that point the cost of being wrong is larger than the cost of a second opinion.

If you are unsure where you sit, the free surface check is a low-effort first step. It looks at what is publicly visible on a domain you own, needs no credit card and takes a few minutes. It is not a full security audit and it will not see inside your code or database, so treat it as a view from the outside. When you want the full picture, the packages page shows how the audit and the ongoing support plans compare.

One practical thing to do today: open your coding tool and ask it, "what could you not verify about this app's security from the code alone?" Whatever it lists is the part still waiting for someone to check.

Want a developer to look at your app?

Built your app with AI tools? Run the free surface check yourself in a few minutes. Nothing to buy, and we never look at your app unless you run it.