• Agents
  • Pricing
  • Blog
Log in
Get started

Security for apps built with AI. Paste a URL, get a report, fix what matters.

Product

  • How it works
  • What we find
  • Pricing
  • Agents
  • MCP Server
  • CLI
  • GitHub Action

Resources

  • Guides
  • Blog
  • Docs
  • OWASP Top 10
  • Glossary
  • FAQ

Security

  • Supabase Security
  • Next.js Security
  • Lovable Security
  • Cursor Security
  • Bolt Security

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy
  • Imprint
© 2026 Flowpatrol. All rights reserved.
Guides

The builder's
field manual.

Pre-launch checklists, platform-specific playbooks, and step-by-step fixes for the bugs your AI keeps shipping. Built for people who ship with Lovable, Bolt, Cursor, Supabase, and Next.js — not security engineers.

ChecklistPlatformsFix recipesDeep divesFAQSources
01·Featured

Before you launch

The single most important thing on this page. Every step takes minutes. Skipping any of them is the difference between a clean weekend and a 3am rotation of every credential you own.

Field manual · Ed. 01

The pre-launch checklist

Ten things to verify before you put a URL on the internet. Tick them off as you go — your progress saves locally.

0/10
complete
  • 01

    Enable Row Level Security on every Supabase table

    AI tools create tables without RLS. Run `SELECT tablename, rowsecurity FROM pg_tables WHERE schemaname = 'public'` and turn it on everywhere — then write a policy for every table you turned it on for.

    Supabase RLS playbook
  • 02

    Move the service_role key off the client

    The service_role key bypasses RLS. It should never appear in code prefixed NEXT_PUBLIC_, in client components, or in your bundled JavaScript. Search your repo for it.

    API key exposure
  • 03

    Confirm `.env` and secrets are not committed

    Run `git log --all --full-history -- .env` and `gitleaks detect`. If anything shows up, rotate every secret it touched — assume it's public.

  • 04

    Add ownership checks on every `/api/{id}` route

    For every route that takes an ID, verify the authenticated user actually owns the resource before returning it. AI ships these without the check ~80% of the time.

    IDOR explained
  • 05

    Sanitize or remove `dangerouslySetInnerHTML`

    If you must render user HTML, run it through DOMPurify first. Most uses can be replaced with plain text rendering — the AI added it because the prompt looked easier that way.

    XSS in React
  • 06

    Use parameterized queries everywhere

    No string concatenation in SQL. Ever. Use the query builder, prepared statements, or your ORM's parameter binding. Search for backtick template strings in `.from(` or `.query(`.

    SQL injection
  • 07

    Verify auth on every protected page and API route

    Deny by default. Have an allow-list of public routes and require a session everywhere else. Double-check middleware actually runs on the routes you think it does.

  • 08

    Set security headers and HTTPS

    Add `Strict-Transport-Security`, `Content-Security-Policy`, `X-Frame-Options`, and `Referrer-Policy`. Vercel and Netlify both support these in their config files.

  • 09

    Lock down CORS to known origins

    No `Access-Control-Allow-Origin: *` on authenticated endpoints. List your real domains. AI tends to default to wildcard because it makes the demo work.

  • 10

    Run a Flowpatrol scan to verify

    After you've done all of the above, prove it. Paste your URL into Flowpatrol and check that nothing on the OWASP Top 10 trips. The scanner is the second pair of eyes you don't have.

    Run a free scan
10 steps to go
02·Playbooks

By platform

The bugs are the same, but every platform ships its own defaults, footguns, and workarounds. Pick yours.

S

Supabase

RLS, anon keys, and the policies your AI never wrote.

68%of Supabase apps ship with broken RLS
L

Lovable

170+ Lovable apps were exposed via the same bug. Here's the fix.

170+apps in the CVE-2025-48757 disclosure
B

Bolt

What Bolt scaffolds, what it skips, and what to add before launch.

7/10OWASP categories Bolt apps fail by default
C

Cursor

Editor-side risks: prompt injection, MCP, and what your IDE can leak.

3classes of editor-side risk to know
N

Next.js

Middleware, server actions, and the bypasses that ship with templates.

CVE-2025-29927middleware bypass — patch yours
M

MCP

Your AI's tool calls are an attack surface. Lock them down.

1 lineis all it took to exfiltrate Postmark inboxes
03·Recipes

Fix the eight most common bugs

You scanned. You found something. Each card is a one-screen fix recipe — what's broken, what to do, and the walkthrough that proves it.

Critical· CWE-862

Fix missing RLS policies

Bug · Tables are exposed via the anon key with no row-level filtering.

Fix · Enable RLS, then write `auth.uid() = user_id` policies for every table.

Walkthrough
Critical· CWE-639

Fix IDOR on API routes

Bug · Routes return any record by ID without ownership checks.

Fix · Add `where user_id = auth.uid()` to every query that takes an ID.

Walkthrough
Critical· CWE-798

Fix exposed API keys

Bug · Service keys, Stripe keys, or OpenAI keys ended up in client bundles.

Fix · Move them to server-only env, rotate them, and re-deploy.

Walkthrough
High· CWE-79

Fix XSS in React

Bug · `dangerouslySetInnerHTML` renders untrusted HTML directly.

Fix · Render as text, or sanitize with DOMPurify before injecting.

Walkthrough
Critical· CWE-89

Fix SQL injection

Bug · String-concatenated SQL queries built from user input.

Fix · Use parameter binding or your ORM's query builder. Never concatenate.

Walkthrough
Critical· CWE-915

Fix signup backdoors

Bug · Mass assignment on signup lets anyone register as admin.

Fix · Allowlist fields on the server. Never spread `req.body` into a user record.

Walkthrough
High

Fix OTP & 2FA bypasses

Bug · OTP verification is client-checked or skippable via response tampering.

Fix · Verify on the server, lock the account state, and rate-limit attempts.

Walkthrough
High

Fix self-upgrade premium bypass

Bug · The "upgrade plan" call accepts the new tier from the client.

Fix · Always derive plan state from your billing provider webhook, never from the request.

Walkthrough
04·Deeper

Go deeper

Reference material, conceptual framing, and longer reads — for when you have a coffee and want to actually understand what you just shipped.

01
Reference15 min

OWASP Top 10 for builders

The canonical security list, rewritten for people who ship with Lovable and Bolt.

02
Reference5 min

Security glossary

IDOR, RLS, XSS, SSRF, SQLi — 30+ security terms in plain English.

03
Walkthrough12 min

Top 10 vulnerabilities in vibe-coded apps

What we found scanning 100 apps shipped with AI tools. The pattern is depressing.

04
Concept8 min

AI agent blast radius

What can your agent actually destroy? A framework for thinking about damage.

05
Walkthrough10 min

NPM supply chain hygiene

Lockfiles, audits, and the 39-minute window that mattered. Practical hardening.

06
Concept6 min

Your agent builds apps. Who checks security?

The handoff problem in AI development, and how to close the loop.

05·Questions

Frequently asked

The questions we get most from builders shipping AI-generated apps. Each answer also lives in the page schema so AI search engines can quote it directly.

How do I secure an app I built with Lovable, Bolt, or Cursor?

Start with the pre-launch checklist on this page. It walks through the ten checks that catch over 90% of the bugs we find in AI-built apps: enabling Row Level Security on every Supabase table, moving the service_role key off the client, sanitizing HTML rendering, parameterizing every SQL query, adding ownership checks on every /api/{id} route, locking down CORS, setting security headers, and verifying with a Flowpatrol scan. Each step links to a deeper guide.

What is Row Level Security in Supabase and why does it matter?

Row Level Security (RLS) is the PostgreSQL feature Supabase uses as its primary access control mechanism. When RLS is enabled on a table, every query is filtered by policies you write — for example "users can only see rows where user_id matches auth.uid()". Without RLS, the anon key (which is meant to be public) gives full read and write access to your entire database. In our scan of 100 vibe-coded apps, 68% of Supabase-backed apps had missing or broken RLS. See the Supabase playbook in the platforms section above for the fix.

Is it safe to expose the Supabase anon key in client-side code?

Yes — but only if Row Level Security is enabled on every table and the policies are correct. The anon key is designed to live in your client JavaScript. Its safety depends entirely on RLS doing its job. The service_role key is the opposite: it bypasses all RLS and must never appear in client code, NEXT_PUBLIC_ environment variables, or your bundled JavaScript.

What is IDOR and how do I fix it?

IDOR (Insecure Direct Object Reference) is the most common bug in AI-generated APIs. It happens when a route like GET /api/orders/{id} returns the order without checking that the authenticated user actually owns it. To fix it, add a where-clause that filters by the current user — for example WHERE user_id = auth.uid() — to every query that takes an ID. The fix recipes section above links to a full walkthrough.

What is the OWASP Top 10 and where does it apply to AI-built apps?

The OWASP Top 10 is the security industry's canonical list of the most critical web application security risks, maintained by the Open Worldwide Application Security Project. It applies one-for-one to AI-built apps — the bugs are exactly the same, AI just ships them faster. We wrote a builder-friendly version at /owasp-top-10 that explains each category in plain English with the actual code your AI ships and how to fix it.

Do I need to be a security engineer to use these guides?

No. These guides are written specifically for builders shipping with AI tools — Lovable, Bolt, Cursor, v0, Replit, Claude — not for security professionals. Every recipe is one screen long, every checklist item takes minutes, and every guide assumes you're a creator or founder, not a penetration tester.

06·Sources

Sources & further reading

Every claim on this page is grounded in standards, official docs, or named CVEs. If you want the source material, here it is.

  • OWASP Top 10:2021
    OWASP Foundation
  • Row Level Security
    Supabase Docs
  • Common Weakness Enumeration (CWE) Top 25
    MITRE
  • Application Security Verification Standard (ASVS)
    OWASP Foundation
  • Secure Software Development Framework (SSDF) — SP 800-218
    NIST
  • CVE-2025-29927 — Next.js Middleware Authorization Bypass
    NVD
  • CVE-2025-48757 — Lovable RLS Misconfiguration
    NVD
  • Web Security Academy
    PortSwigger

Last reviewed and updated 7 April 2026 · Maintained by the Flowpatrol Team

Done reading?

Reading the field manual is half of it. The other half is proving your app actually does what the checklist says. Paste a URL.

Run a free scanSee the OWASP Top 10