← All guides

AI code review vs human code review: what AI tools miss in vibe-coded apps

Supabasev0CursorLovableBolt

If an AI tool built your app, asking another AI tool to check it feels like the obvious next step. AI code reviewers and automated scanners are fast, cheap and worth turning on. They also have a blind spot that matters for vibe-coded apps: they’re good at spotting code that looks wrong, and weaker at spotting code that looks right but breaks your business rules.

This guide compares the two fairly. It covers what each category of tool does (described from the vendors’ own docs), whether AI review comments can match a senior reviewer’s, the holes automated review can miss, a worked example of one of those holes, what makes a human review unbiased, and a practical way to use both. If your app runs on Supabase, the /fix/supabase page lists the related guides in one place.

The tools, in four categories

“AI code review” covers several different kinds of tools. Separating them helps, because each catches different things.

Static analysis (SAST)

These tools read your source code without running it and match it against known insecure patterns.

  • Semgrep covers static analysis, open source dependency scanning and secrets detection, and analyses source code without running it. You can use ready-made rules, community rules or your own. Semgrep’s docs also say its paid AppSec Platform now adds AI-powered detection aimed at business-logic flaws such as IDOR and broken authentication, on top of its rule-based engine (Semgrep docs).
  • GitHub CodeQL is GitHub’s code analysis engine. It turns your codebase into a database, runs queries against it to find vulnerabilities and errors, and lists what it finds under code scanning alerts. Public repositories get code scanning, and so do organisation repositories that have GitHub Code Security turned on (GitHub Docs: Code scanning with CodeQL).

Dependency and secret scanning

  • Dependabot alerts warn you when a package your repository depends on has a known vulnerability listed in GitHub’s Advisory Database, and name a patched version if there is one (GitHub Docs: Dependabot alerts).
  • GitHub secret scanning searches all branches and all past commits for hardcoded credentials such as API keys, passwords and tokens, and also checks issues, pull request text and wikis (GitHub Docs: Secret scanning). If it finds a live key, our leaked API key guide covers what to rotate first.

AI pull-request reviewers

  • GitHub Copilot code review reviews pull requests (and local changes in supported editors) and proposes fixes that take a click or two to accept. You choose how hard it works: Lite gives quick feedback on bugs, security problems and style, Balanced (the default) spends more time on tricky logic and code that touches security, and Max is the deepest pass. Max and an Adaptive option that picks a level for you are in public preview (GitHub Docs: Copilot code review). Which plans include it, and how reviews are billed, are on that page; check it rather than relying on a summary. Our Copilot security review guide goes through what it checks and misses in detail.
  • CodeRabbit offers automated, context-aware pull request reviews that it says learn from your team’s feedback, plus reviews in the IDE and CLI. Its docs now also list separate products for testing pull requests against a running app and for security scans (CodeRabbit docs).

Platform advisors

  • Supabase’s advisors are deterministic checks built into the platform, shown in Studio as the Security, Performance and Health Advisors and also available from the CLI and MCP. The security lints include rls_disabled_in_public, policy_exists_rls_disabled, rls_enabled_no_policy and permissive_rls_policy, which flags policies with an always-true condition such as USING (true) (Supabase docs: Advisors). For a Supabase-backed app they’re a free check worth running before every launch.

What automated review does well

Be fair to the tools: for a lot of problems, they beat a tired human.

  • Known bad patterns. SQL built by string concatenation, unsafe HTML rendering, weak crypto calls, eval. Rule-based scanners find these consistently across the whole codebase, within the patterns their rules cover.
  • Leaked secrets. Secret scanners catch keys a human skims past, including ones buried in old commits.
  • Vulnerable dependencies. No human tracks every advisory for every package. Dependabot does.
  • Configuration you can check mechanically. “RLS is off on this public table” and “this policy lets everyone in” are yes/no facts, and Supabase’s advisors report both.
  • Everyday code quality. AI pull-request reviewers flag bugs, security problems and style inconsistencies (the categories GitHub lists for Copilot code review), and they can run on every pull request.
  • Speed and cost. They run in minutes, on every change.

For a vibe-coded app, turning on secret scanning, dependency alerts, a SAST tool and the Supabase advisors is a sensible, low-cost first step. Our vibe-coded app security checklist covers the manual checks to pair with them.

What automated review can miss

The common thread: these tools don’t know your business rules. They can see that code runs a query. Without a written description of who may do what, they have no way to know whether this user should see that row.

GitHub is candid about this. Its responsible-use page warns that Copilot code review can overlook issues, above all in big or complicated pull requests, that it sometimes reports issues that aren’t real, and that a person should still review the code with care rather than leave it to Copilot (GitHub Docs: Responsible use of Copilot agents).

Categories that can slip through:

  • Missing authorization (IDOR). OWASP describes Insecure Direct Object Reference as attackers reading or changing records by tampering with the identifiers in URLs or parameters, because the app never checks whether that user may access that record (OWASP IDOR cheat sheet). Broken access control is ranked first in the OWASP Top 10:2025, and OWASP reports that every application in its test data had some form of it (OWASP A01:2025).
  • Policies that exist but check the wrong thing. An advisor can tell you RLS is on, a policy exists, and the policy isn’t simply true. It can’t tell you the policy lets any team member read a row that only its owner should see.
  • Business logic. Can a user apply a discount twice? Downgrade a plan and keep paid features? Approve their own expense claim in an admin tool? Only someone who knows what the app is supposed to do can say.
  • Trusting the client. Prices, roles or “is_admin” flags sent from the browser and accepted by the server. The code is tidy; the design is the bug.
  • Flows across files and services. A payment that only “completes” when the browser reaches a success page, instead of being confirmed by the payment provider’s webhook. Each file looks fine on its own.
  • Privileged keys used in the wrong place. In Supabase, a secret key (or the legacy service_role key) skips RLS when the request carries no signed-in user’s token, so it belongs on the server only (Supabase RLS docs). Using it server-side is correct. Using it server-side without your own ownership checks is the hole, and nothing in the code looks unusual. Our RLS policies explainer covers how policies and keys fit together.

Can AI give human-like review comments?

Partly. On the surface, current AI reviewers already write comments that look like a colleague’s. Copilot code review, for example, ties each comment to specific lines, labels it High, Medium or Low severity, can include a suggested change, and closes with an overview giving its view on whether the change can be approved. Its comments can be replied to, resolved and hidden just like a teammate’s (GitHub Docs: Using Copilot code review). Copilot also reads your repository’s custom instructions and gathers context from the rest of the repository.

What’s harder to copy is the judgement behind a senior reviewer’s comments:

  • Intent. A senior reviewer asks what the feature is for, then checks the code against that. An AI reviewer sees the diff and whatever context it’s given, so it can’t object to a rule nobody wrote down.
  • Risk ranking across the app. A severity label applies to one comment. A human can say “fix the invoice route before launch; the other twelve comments can wait”, based on what data is at stake and who can reach it.
  • Testing, not just reading. A human signs in as two users and tries the attack. CodeRabbit’s docs, for example, now list a product that tests pull requests against your running app, but someone still has to define what counts as a wrong result.
  • Knowing when to stay quiet. GitHub warns that its reviewer can report problems that don’t exist. A long list of plausible comments can bury the one that matters, and someone has to sort them.

So yes, AI review comments can read like a human’s. Treat them as a fast first pass, and have a person decide which ones matter for your business. You can close part of the gap by writing your access rules into the instruction files AI tools read; our guide to AGENTS.md, CLAUDE.md, Cursor rules and Lovable instructions explains where each tool looks.

A worked example: an IDOR that looks clean

This is illustrative code written for this guide, not taken from a real app or incident. It’s a simplified Next.js App Router route handler in a Supabase-backed invoicing app.

The feature: a signed-in user downloads one of their invoices from /api/invoices/[id].

// app/api/invoices/[id]/route.ts  (ILLUSTRATIVE, contains a bug)
import { createClient } from '@supabase/supabase-js'
import { NextResponse } from 'next/server'
import { getSessionUser } from '@/lib/auth'

const admin = createClient(
  process.env.SUPABASE_URL!,
  process.env.SUPABASE_SECRET_KEY! // server-only secret key, never shipped to the browser
)

export async function GET(
  _req: Request,
  { params }: { params: Promise<{ id: string }> }
) {
  const user = await getSessionUser()
  if (!user) {
    return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
  }

  const { id } = await params
  const { data, error } = await admin
    .from('invoices')
    .select('*')
    .eq('id', id)
    .single()

  if (error || !data) {
    return NextResponse.json({ error: 'Not found' }, { status: 404 })
  }
  return NextResponse.json(data)
}

Why this can pass automated checks:

  • It type-checks and lints cleanly.
  • The secret key is read from an environment variable on the server, not hardcoded and not in client code, so there’s nothing for a secret scanner to flag.
  • The query uses the Supabase client’s parameterised filters, not string-built SQL, so there’s no injection pattern.
  • It checks that the user is logged in and returns sensible status codes. An AI reviewer looking at this diff sees authentication, error handling and a clean structure.
  • If RLS is enabled on invoices with a correct owner policy, the database advisors report no problem, because the table is protected. The route just goes around the protection with a key that skips RLS.

The hole: the route checks that someone is logged in, never that this person owns invoice id. Any signed-in user who changes the ID in the URL gets someone else’s invoice. That’s the IDOR pattern OWASP describes. Hard-to-guess UUIDs don’t fix it either; OWASP’s cheat sheet treats complex IDs as an extra layer, and still requires an access check on every record.

A human reviewer catches this by asking a business question rather than a code question: “Who is allowed to see an invoice, and where is that enforced?”

Two ways to fix it

Option 1: let RLS do its job. Use a Supabase client that acts as the signed-in user (your publishable or legacy anon key plus the user’s session) instead of the secret key, and make sure the table has an owner policy like the pattern in Supabase’s docs:

-- ILLUSTRATIVE
alter table public.invoices enable row level security;

create policy "Users can read their own invoices"
on public.invoices for select
to authenticated
using ( (select auth.uid()) = user_id );

Now the database itself refuses to return another user’s row, even if the route forgets.

Option 2: if you must use the secret key, check ownership explicitly.

// ILLUSTRATIVE
const { data, error } = await admin
  .from('invoices')
  .select('*')
  .eq('id', id)
  .eq('user_id', user.id) // ownership check
  .single()

Either way, test it the way a human would: sign in as user A, copy the URL of one of A’s invoices, sign in as user B, and open it. You should get a 404, not the invoice.

Side by side

Automated scanners and AI reviewersHuman reviewer
Known insecure code patternsStrong and consistentGood, but slower and can miss things when tired
Leaked secrets and vulnerable dependenciesStrongWeak without tools
Mechanical config checks (RLS on/off, always-true policies)StrongGood
Whether a policy matches your business rulesWeakStrong, if they understand the product
Authorization across routes and servicesWeak to mixedStrong
Payment, role and pricing logicWeakStrong
Ranking findings by business riskPer comment onlyStrong
Cost per reviewLowHigher
Runs on every changeYesNot practical

Reviewing an app built with Lovable, Bolt or Cursor

The same split applies to apps built with AI app builders. Related guides are collected on the /fix/lovable, /fix/bolt and /fix/cursor pages, with a few platform-specific starting points.

  • Lovable. Lovable runs automatic checks before you publish (database access rules, MCP tools exposed without sign-in, vulnerable packages) and optional advanced checks that read the whole codebase, including access permissions and payments. Lovable’s own docs say these checks can’t replace a full security review and suggest a security professional for apps with sensitive data or critical tasks (Lovable docs: Security overview). Our guide to Lovable security scan findings explains what each finding means and how to fix it.
  • Bolt and Lovable code on GitHub. Once the code is in a GitHub repository, every GitHub tool above (secret scanning, Dependabot, CodeQL, Copilot code review) can run on it. Our export guide for Lovable and Bolt apps shows how to get the code there and run it locally.
  • Cursor. Cursor works on a local repository, so the same GitHub checks apply to the pull requests you open from it. If an agent session changed more than you expected, review the diff before merging; our guide to undoing AI agent changes with Git covers rolling back safely.

Whichever builder you used, run the vibe-coded app security checklist and the two-account test from the worked example before launch.

What makes a review unbiased

“Unbiased” is a fair thing to ask of a code review, and it comes down to a few checkable points:

  • The reviewer didn’t write the code. The tool or person that generated the code shouldn’t be the only one grading it. The same applies to asking the AI that built the feature whether the feature is secure.
  • No stake in a rebuild. A reviewer who is hoping to win a rewrite has a reason to make the code look worse than it is. Ask up front whether a rewrite is on the table, and keep the review separate from any follow-on work.
  • Written findings with evidence. Each finding should name the file or setting, explain the risk in plain language, and show how to reproduce it, for example “signed in as user B, opened user A’s invoice URL, got the invoice”.
  • Ranked by business risk. A finding that exposes customer data comes before a naming nitpick, and the report says which is which.
  • Scope agreed up front. Which routes, tables, roles and flows are in scope, which are not, and what you’ll receive at the end. This stops the review from quietly skipping the hard parts.

Our guide to hiring a developer to fix AI-generated code has questions to ask and red flags to watch for when you choose someone.

How to combine both

You don’t have to pick one. A practical setup for a vibe-coded app:

  1. Turn on the automated layer first. Secret scanning, dependency alerts, a SAST tool such as Semgrep or CodeQL, and the Supabase advisors if you use Supabase. Fix what they find. It’s cheap, and it clears noise before a human looks.
  2. Add an AI reviewer to pull requests, if you work through GitHub. Treat its comments as a second pair of eyes, not a sign-off.
  3. Write down your access rules in plain language. “Users see only their own invoices. Team admins see their team’s. Nobody edits a paid invoice.” This one page makes both AI and human review far better.
  4. Have a human review the risky surfaces. Every route or function that reads or writes user data, everything that uses a secret or admin key, payments, roles and admin tools. Ask them to test with two accounts, not just read the code.
  5. Re-run the human review when the risky parts change, for example new roles, a new payment flow, or a new table holding personal data. Keep the automated layer running on everything else.

FAQ

Which AI code review tools give human-like comments?

Think in categories rather than rankings. AI pull-request reviewers such as Copilot code review and CodeRabbit write line-by-line comments in plain language with suggested fixes, which is the closest to a human reviewer’s style. Rule-based scanners such as CodeQL, Semgrep’s rule engine, Dependabot and secret scanning produce alerts, not conversation. Platform checks such as the Supabase advisors and Lovable’s security checks report findings about your settings. None of them knows your business rules unless you write them down.

Is AI code review enough before launch?

Not on its own for an app that handles user data or payments. GitHub’s guidance is to pair Copilot’s feedback with a careful review by a person, and Lovable’s docs say its checks don’t replace a full security review. Before launch, run the automated layer, fix what it finds, then test every data route with two separate test accounts.

How do I get an unbiased code review?

Choose a reviewer who didn’t write the code and has no stake in a rebuild, agree the scope in writing first, and ask for written findings with steps to reproduce each one, ranked by business risk. The hiring guide has questions that help you check this before you commit.

What does a human reviewer check that AI misses?

Mainly the things that depend on what your app is supposed to do: who may see or change each record, whether policies match those rules, payment and role logic, values trusted from the browser, and flows that cross several files or services. A human also tests with real accounts and ranks findings by what’s at stake for your business.

Can I use AI review and human review together?

Yes, and that’s the setup this guide recommends. Let the automated tools run on every change, and bring in a human for the risky surfaces and whenever they change.

Comments

Add a comment

Generated for you. Click to type your own.

Required. Never shown on the page. Privacy policy.

Basic markdown: **bold**, *italic*, `code`, lists, quotes, and fenced code blocks. HTML shows as plain text.

Your draft stays on this device until you post.