Security guides for AI-built apps
Long-form guides that explain one problem properly: why it happens in AI-built apps, how to check your own project and how to fix it, with code we tested.
Pillar guides
Security · ChecklistPre-launch security checklist for AI-built SaaSAn interactive security checklist for apps built with Lovable, Bolt, Cursor and Supabase: eight phases from data access to monitoring, with tested SQL checks.9 min readSupabase · DatabaseSupabase Row Level Security: the complete guide for vibe codersWhat Supabase row level security does, why AI-built apps often ship without it, and how to check, write and test owner-only policies, with tested SQL.9 min readLovable · SecurityIs your Lovable app secure? A 30-minute self-auditA timed self-audit for Lovable apps: run Lovable’s built-in security check, then test database rules, keys, functions and a second account in 30 minutes.11 min readSecurity · SecretsAPI keys in AI-built apps: what is safe in the frontend and what is notWhich keys may sit in browser code and which must stay on the server: Supabase publishable vs secret keys, VITE_ variables, OpenAI, Anthropic and Stripe keys.12 min readSupabase · DatabaseMulti-tenant data isolation: users must never see each other’s dataKeep workspaces and customers apart in a Supabase app: tenant IDs, a membership table, RLS helpers, composite foreign keys and a two-tenant test.14 min readSupabase · Edge FunctionsSecuring Supabase Edge Functions and serverless APIsHow to secure Supabase Edge Functions: verify_jwt, reading the user from the token, the secret key, CORS, input checks, rate limits, secrets and safe logs.13 min readStripe · PaymentsStripe in vibe-coded apps: webhooks, subscriptions and the mistakes that cost moneySecure Stripe in AI-built apps: verified webhooks, duplicate events, server-side prices, subscription checks in RLS, test vs live keys and restricted keys.12 min read
In-depth guides
Security · AI appsCalling OpenAI or Anthropic safely: server proxy, quotas and spend capsHow to call AI APIs from a Lovable or Supabase app without leaking the key or the budget: an Edge Function proxy, per-user quotas, token caps and spend limits.6 min readSecurity · Web basicsCORS explained for vibe coders: what it protects and what it does notWhat CORS really does, why it is not authentication, how preflight works, the credentials and wildcard rule, and how to set CORS headers on a Supabase Edge Function.6 min readSecurity · ReportsHow to read a security report: severity, confidence and what to fix firstSeverity, confidence and exploitability are three different questions. How to read a security report, spot false positives and decide what to fix first.7 min readSupabase · DatabaseHow to test your Supabase RLS policies with SQLTest Supabase RLS policies the way an attacker would: as a visitor, as two different users and as the service role, in plain SQL and with pgTAP.6 min readSupabase · Billing logicHow users bypass paywalls in AI-built apps, and how to stop itWhy a plan or credit check in your React code doesn’t protect anything, and how to enforce plans, credits and paid status in Supabase with RLS, grants and functions.6 min readSupabase · IncidentLeaked Supabase service_role key: what to do in the first 60 minutesYour Supabase secret or service_role key leaked. A minute-by-minute plan: stop the leak, rotate the key, retire the old one, check logs and clean up git.7 min readSecurity · AI appsPrompt injection in the AI features of your app: what it can do and how to contain itDirect and indirect prompt injection in apps that call an LLM: what an attacker can and cannot do, and how least-privilege tools and safe output handling contain it.7 min readSecurity · AI appsRate limiting for AI-built apps: what to limit and whereWhich endpoints of a Lovable or Supabase app need rate limits, what Supabase Auth already limits for you, and a tested Postgres counter for AI endpoints.7 min readSupabase · Access controlRoles and permissions in Supabase: admins, members and viewers done rightHow to build admin, member and viewer roles in Supabase that users can’t grant themselves: a roles table, app_metadata or a custom access token hook. Tested SQL.6 min readSecurity · SecretsSecrets in git history: find them, rotate them, then clean upA key you deleted is still in git history. Find leaked secrets with git log, Gitleaks or GitHub secret scanning, rotate them first, and know when to rewrite.6 min readSupabase · DatabaseSECURITY DEFINER functions in Supabase, done rightWhen a Supabase function should run as SECURITY DEFINER, and the five rules that keep it safe: empty search_path, caller checks, revoked EXECUTE, tested SQL.7 min readSecurity · Web basicsSecurity headers for Vite and Lovable apps: which ones and where to set themWhich security headers a Vite single-page app needs (CSP, HSTS, nosniff, Referrer-Policy, Permissions-Policy) and how to set them on Vercel, Netlify and Cloudflare.6 min readSupabase · AuthSupabase Auth pitfalls: e-mail confirmation, password reset and redirect URLsSix Supabase Auth settings AI-built apps get wrong: e-mail confirmation, Site URL, redirect allow list, password reset, e-mail enumeration and anonymous users.6 min readSupabase · RealtimeSupabase Realtime security: who can listen to whatHow to keep Supabase Realtime private: RLS for Postgres Changes, private channels and policies on realtime.messages for Broadcast and Presence, with tested SQL.6 min readSupabase · StorageSupabase Storage security: buckets, policies and signed URLsHow to keep files in Supabase Storage private: public vs private buckets, per-user folder policies on storage.objects and short-lived signed URLs, with tested SQL.6 min readSupabase · DatabaseSupabase views bypass RLS: security_invoker explainedWhy a Postgres view in Supabase can show every row even when the table has RLS, how security_invoker fixes it and how to find leaky views, with tested SQL.6 min read
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