Deutsch
GuideSecurity · Checklist

Pre-launch security checklist for AI-built SaaS

An interactive security checklist for apps built with Lovable, Bolt, Cursor and Supabase: eight phases from data access to monitoring, with tested SQL checks.

By Tim GeithnerPublished 9 min read

Short answer

Before you launch an AI-built SaaS, check eight things in this order: every table has row level security with owner policies, no secret key reaches the browser, every server function verifies the caller, sign-in settings are hardened, payments are confirmed by signed webhooks, AI features have per-user limits and a spend cap, the deployment sends security headers, and you’ll notice when something goes wrong. Tick the boxes below; your progress stays in your browser.

Ask an AI about this page:ChatGPTClaude

On this page

Key takeaways

  • Go through the phases in order: data access and keys first, because a mistake there exposes every user at once.
  • The database phase comes with five SQL checks you can paste into the Supabase SQL Editor. Each one returned exactly the broken objects in our test database.
  • Several important settings, like e-mail confirmation and SSL enforcement, live only in the Supabase dashboard. No code review can see them, so check them by hand.
  • Payments and AI features need server-side checks: signed webhooks, prices and credits the client can’t set, per-user limits and a spend cap.
  • Your ticks are saved in this browser, so you can stop and continue later.

This checklist is for the moment before real users arrive: you built the app with Lovable, Bolt, Cursor or Claude Code on Supabase, it works, and you want to know it is safe to open the doors. It has eight phases. Each starts with one or two sentences on why it matters, then a list you can tick, then links to the pages that explain every item in depth. The background for all of it is in the complete security guide for AI-built apps.

How should you work through it?

Start at the top and don’t skip ahead. The first three phases cover problems where one request, often without an account, reaches every user’s data. The later phases matter, but they rarely matter if a table is open.

Two tips before you begin:

  • Keep a second test account ready. Many checks ask “what does another user see?” You need a real second user, signed in in a private window, to answer that.
  • Write down what you fix. A short note per item (“RLS on orders, migration 0012”) makes the next review much faster and helps if you ever have to explain your setup to a customer.

Short on time before launch day? The launch readiness check picks the points from this list that matter most and tells you whether you are ready.

Phase 1: Can users reach only their own data?

In a Supabase app the browser talks to the database with a public key, so row level security is the only thing between one user’s data and everyone else. Most serious leaks in AI-built apps start here, which is why this phase is the longest.

Run these five checks in the SQL Editor of your Supabase dashboard. They read table and policy settings, not your data. We ran each query against a test database with Supabase’s roles and default grants, seeded with one broken and one correct example of every mistake; every query returned exactly the broken one.

1. Tables in public without RLS
select n.nspname as schema, c.relname as table_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind in ('r', 'p')
  and n.nspname = 'public'
  and not c.relrowsecurity;

Every row is a table that a signed-out visitor can read and change through the API. In our test, the listed table returned all rows to the anon role and let it update them.

2. Policies that let every row through
select tablename, policyname, cmd, roles, qual, with_check
from pg_policies
where schemaname = 'public'
  and (qual = 'true' or with_check = 'true');

Each result should be public data on purpose, such as published blog posts. Anything private here is open to everyone the policy names.

3. Policies that trust user_metadata
select tablename, policyname
from pg_policies
where schemaname = 'public'
  and (qual like '%user_metadata%' or with_check like '%user_metadata%');

Users can edit their own user_metadata. In our test, a user who put role: admin there passed an admin policy built on it. Read roles from app_metadata or a table instead.

4. SECURITY DEFINER functions without a fixed search_path
select p.proname as function_name
from pg_proc p
join pg_namespace n on n.oid = p.pronamespace
where n.nspname = 'public'
  and p.prosecdef
  and not exists (
    select 1 from unnest(coalesce(p.proconfig, '{}')) as cfg
    where cfg like 'search_path=%'
  );

These functions run with their owner’s rights. With Supabase’s default grants, a new function in public can be called by signed-out visitors too; our test confirmed that. Each one needs set search_path = '' and its own check of who is calling.

5. Views that ignore RLS
select c.relname as view_name
from pg_class c
join pg_namespace n on n.oid = c.relnamespace
where c.relkind = 'v'
  and n.nspname = 'public'
  and not exists (
    select 1 from unnest(coalesce(c.reloptions, '{}')) as opt
    where opt in ('security_invoker=true', 'security_invoker=on', 'security_invoker=1')
  );

A view without security_invoker runs with its creator’s rights. In our test it showed a signed-in user every row of a table whose policies allowed them only one.

Phase 1: Data access

0/11 done

Your progress is saved in this browser only.

Go deeper: Supabase row level security, how to test your RLS policies, multi-tenant data isolation, views and security_invoker, SECURITY DEFINER functions, Storage security, Realtime security. Fix pages: table without RLS, using (true), RLS on, no policies, missing ownership check, public bucket with private files, SECURITY DEFINER without checks.

Phase 2: Are all secrets out of the browser?

The secret or service_role key skips every policy from phase 1, and a Stripe or AI key in the browser lets anyone spend your money. Vite’s documentation says variables starting with VITE_ are exposed in client-side code after bundling, so a secret with that prefix is public.

A quick check: build your app, then search the output for secret prefixes and for the first characters of each secret key you have (copy them from the provider’s dashboard):

Search your build for secrets
npm run build
grep -rnoE "sb_secret_[A-Za-z0-9_-]+|whsec_[A-Za-z0-9]+" dist/
grep -rn "PASTE_THE_FIRST_10_CHARACTERS_OF_A_SECRET" dist/

Any hit means the key is in your public bundle. Move it to an edge function, then rotate it, because it may already have been copied.

Phase 2: Keys and secrets

0/9 done

Your progress is saved in this browser only.

Go deeper: API keys in AI-built apps, secrets in git history, leaked service_role key: the first 60 minutes. Fix pages: service_role key in the frontend, secret in a VITE_ variable, AI key in client code, exposed source maps or .env.

Phase 3: Do your server functions check who is calling?

Edge functions usually hold the secret key, so they decide access themselves. Supabase’s docs recommend keeping JWT verification on for user-facing functions and using a client with the caller’s token, so their RLS policies still apply; the admin client bypasses RLS and should be the exception.

Phase 3: Server functions

0/9 done

Your progress is saved in this browser only.

Go deeper: securing Supabase Edge Functions, rate limiting for AI-built apps, roles and permissions in Supabase. Fix pages: edge function without auth, edge function trusts user_id from the body, admin check only in the frontend, subscription check only in the frontend.

Phase 4: Is sign-in hardened?

Most of this phase is dashboard settings that live outside your code. The items below come from Supabase’s production security checklist and production checklist, plus the redirect and enumeration problems we see in generated sign-in screens.

Phase 4: Sign-in

0/9 done

Your progress is saved in this browser only.

Without custom SMTP, Supabase’s production checklist lists a default limit of two auth e-mails per hour, which is fine for testing and too low for a launch. Go deeper: Supabase Auth pitfalls. Fix pages: open redirect after login, password reset that redirects anywhere, e-mail enumeration, no rate limit on login or AI endpoints.

Phase 5: Can payments be faked or skipped?

Your app must only believe what Stripe confirms through a signed webhook. Stripe’s docs say to verify the Stripe-Signature header with the endpoint’s whsec_ secret on the raw request body, and to log processed event IDs, because the same event can arrive more than once.

Phase 5: Payments

0/7 done

Your progress is saved in this browser only.

Go deeper: Stripe in vibe-coded apps, how users bypass paywalls. Fix pages: Stripe webhook without signature check, non-idempotent Stripe webhook, credits granted client-side.

Phase 6: Are your AI features capped and contained?

An AI endpoint without limits turns a script into a bill; the OWASP Top 10 for LLM Applications calls this Unbounded Consumption and recommends rate limiting, user quotas and input size limits. The second risk is prompt injection: a model that reads user text can be talked into misusing whatever data and tools you give it.

Phase 6: AI features

0/8 done

Your progress is saved in this browser only.

Go deeper: calling OpenAI or Anthropic safely, prompt injection in your app’s AI features. Fix pages: no AI spend cap, AI key in client code. An AI key in your frontend is a leaked secret, which the live Security audit covers; limits and spend caps belong to the AI & API integrations audit, which is still in development.

Phase 7: Is the deployment hardened?

These are cheap settings that close whole classes of bugs. The header values below are the ones the OWASP HTTP Headers Cheat Sheet recommends; a Content Security Policy needs to be fitted to your app, so start with a report-only policy and tighten it.

HeaderValue to start with
Strict-Transport-Securitymax-age=63072000; includeSubDomains; preload (check every subdomain serves HTTPS first)
X-Content-Type-Optionsnosniff
Referrer-Policystrict-origin-when-cross-origin
Content-Security-PolicyFitted to your app; include frame-ancestors 'none' or 'self'
X-Frame-OptionsDENY, where you can’t set frame-ancestors
Permissions-Policygeolocation=(), camera=(), microphone=() unless you need them

Phase 7: Deployment

0/8 done

Your progress is saved in this browser only.

Go deeper: security headers for Vite and Lovable apps, CORS explained. Fix pages: CORS wildcard with credentials, XSS via dangerouslySetInnerHTML, exposed source maps or .env. Dependency checks are not part of ShipRely’s live audits yet; the Dependencies audit is in development.

Phase 8: Will you notice when something goes wrong?

Launch is when the unknown problems start arriving. You want to hear about them from your own alerts, not from a user’s e-mail, and you want a plan for the bad day.

Phase 8: Monitoring and recovery

0/8 done

Your progress is saved in this browser only.

Supabase’s production checklist notes that backups on the free plan can’t be downloaded and suggests point-in-time recovery once a database is expected to exceed 4 GB. Go deeper: leaked service_role key, the first 60 minutes, how to read a security report. Fix page: personal data in logs.

What can ShipRely check from this list?

ShipRely reads your repository with a read-only GitHub App and never runs your code. Here is what that covers today, honestly:

PhaseCovered by ShipRely’s live audits?
1. Data accessYes, from your migrations and code (Database & Supabase audit)
2. Keys and secretsYes, keys in frontend code and env files (Security audit); not your git history or live bundle
3. Server functionsYes, auth checks and trusted input in your functions (Security audit)
4. Sign-inPartly: auth logic in your code; dashboard settings are invisible to a code audit
5. PaymentsNot yet, the Payments audit is in development
6. AI featuresKeys only; limits and spend caps belong to an audit in development
7. DeploymentNot yet for headers and dependencies; settings on your host are invisible to a code audit
8. MonitoringNo, these are account and process settings

A prompt to prepare your app for launch

If you want your AI builder to do the first pass on the code-side items, paste this and review every change it proposes:

Pre-launch security pass

I’m about to launch this app. Go through it and report, file by file, without changing anything yet:

  1. Every table in the public schema without row level security, every policy that uses true, and every policy that reads user_metadata.
  2. Every SECURITY DEFINER function without set search_path = ‘’ or without a check of auth.uid().
  3. Every place a secret key (Supabase secret or service_role, Stripe, OpenAI, Anthropic) is used in frontend code or in a VITE_ variable.
  4. Every edge function that does not verify the caller’s JWT or that reads a user ID from the request body.
  5. Every check of admin role, plan, subscription or credits that only happens in the frontend.
  6. The Stripe webhook: does it verify the signature on the raw body and skip event IDs it has already processed?
  7. Every AI endpoint: is it behind sign-in, limited per user, and is the output rendered as plain text?

Then propose fixes as separate migrations and function changes, one problem at a time.

When the code-side items are done, go through the dashboard items in phases 4, 7 and 8 by hand. They take minutes and no tool can tick them for you.

Frequently asked questions

How long does this checklist take?

For a typical small Supabase app, the database and key phases take the most time, because you look at every table and every place a key is used. The other phases are mostly settings you check once. Plan an afternoon the first time; after that, re-running the SQL checks before each release takes minutes.

Which items can I skip for a beta with a few friends?

None of the data and key items. Real users mean real data, and a table without row level security is open to anyone with your public key, not only to your testers. You can postpone some monitoring and hardening items, such as point-in-time recovery or a strict Content Security Policy, until you have paying customers.

Does passing this checklist make my app secure?

It removes the mistakes that most often expose data or money in AI-built apps, but it is not a full security review. Business logic specific to your app, such as who may invite whom or what an admin may change, still needs its own thought and tests.

Do I have to redo the checklist after every change?

Re-run the SQL checks and the Security Advisor after every migration, because each new table or function can reopen a gap. The settings in the sign-in, deployment and monitoring phases rarely change, so a review every few months is enough.

Sources

  1. 1.Production security checklist — Supabase Docs
  2. 2.Production checklist — Supabase Docs
  3. 3.Performance and Security Advisors — Supabase Docs
  4. 4.Securing Edge Functions — Supabase Docs
  5. 5.Env variables and modes — Vite
  6. 6.Receive Stripe events in your webhook endpoint — Stripe Docs
  7. 7.HTTP Security Response Headers Cheat Sheet — OWASP Cheat Sheet Series
  8. 8.LLM10:2025 Unbounded Consumption — OWASP Top 10 for LLM Applications

Find this in your own app

ShipRely reads your repository (read-only), proves each finding with file and line, and gives you a fix prompt to paste into your AI builder.

Run a demo audit
  • Read-only access to your repository
  • Every finding with file and line
  • Fix prompts for Lovable, Cursor, Claude Code and Bolt