Before You Launch Your Vibe-Coded App: The Security Checklist (RLS, Exposed Keys, Subscription Bypasses)
21 December 2026 · Updated 28 November 2026 · 11 min read · by Yang Kai
Audits of AI-built apps keep finding the same holes: row level security off, secret keys in client code, payment webhooks that trust the success page. A plain-language pre-launch checklist with a verification step for every item.
Checklist inside: Pre-launch security checklist with a non-expert verification step for every item
Contents
In a widely shared r/selfhosted thread — the post scored above 9,500 — a security audit of Huntarr, a self-hosted media app its creator described as fully vibe-coded, reported 21 critical and high-severity vulnerabilities. The auditor reached the app’s API keys with a single curl command. Full account takeover was on the list.
A second case, reported in coverage of audits run over apps that builders had posted on Reddit, ended worse: a vibe-coded app with paying customers was broken into, its API keys maxed out by strangers, and its subscription checks bypassed. The builder shut the app down for good.
Neither failure needed a genius attacker. Both came from the same short list of configuration mistakes that AI builders make by default — and that a non-expert can check in an afternoon. This article is that check, in plain language: what to look at, why it matters, and how to verify it yourself, including the exact questions to ask your AI builder so it has to show you the evidence.
The short version: turn on row level security for every table, keep secret keys on the server only, verify payment webhooks by signature, check authentication on every API route, rate-limit anything that costs you money, keep secrets out of your code repository, and keep a backup you have actually restored. Seven items. Most vibe-coded apps fail at least two.
Why AI-built apps fail in the same places
An AI builder optimises for the feature working in your demo. Security controls are invisible in a demo: a database with no access rules returns data exactly like a locked-down one, right up until someone else asks it for data. So the builder ships the happy path, and the unhappy path ships with it.
Audits of Reddit-posted vibe-coded products keep landing on the same finding first: Supabase databases with row level security missing or misconfigured. It is worth understanding why that one item causes so much damage, because the same shape repeats across the whole list: a default that is fine for development becomes the vulnerability at launch. The agent-side version of this problem — what your coding tool itself may touch — is covered in Claude Code Permissions and Sandboxing; this checklist is about the app you ship, not the tool you built it with.
The checklist
1. Row level security on every table
What to check: in Supabase, every table in the public schema has RLS enabled, and has policies that say who can read and write which rows.
Why it matters: Supabase hands your app a public “anon” key that is designed to be visible in browser code. That key is only safe because RLS stands behind it. With RLS off, anyone who finds the key — it is printed in your site’s JavaScript — can read, change or delete the whole table through Supabase’s API. User emails, orders, private content: all of it, no password needed. The separate service-role key bypasses RLS completely, which is why item 2 exists.
How to verify: open your Supabase dashboard, go to Authentication » Policies (or the table editor’s RLS indicator), and confirm every table shows RLS enabled with at least one policy. Then ask your AI builder: “Show me the RLS policy for the users table and explain, in plain words, who can read a row.” If the answer is “anyone”, you have found your first fix. The real test: create a second test account and confirm it cannot see the first account’s data.
2. Secret keys live on the server, never in client code
What to check: your service-role key, payment secret keys and AI API keys exist only in server-side environment variables. Nothing secret appears in browser code, mobile app code, or any file your build ships to users.
Why it matters: anything in client code is public. Attackers scan shipped JavaScript and public repositories for key patterns automatically; the Huntarr audit’s curl command worked because the app handed its keys to anyone who asked correctly. A leaked AI API key gets resold and burned through in hours — that is the “maxed out API keys” half of the shutdown story above.
How to verify: search your project for the key prefixes — service_role, sk_live, sk- — and confirm the matches are only in server files and your .env, never in anything under a public, src/components or client bundle path. Ask your builder: “List every place each secret key is used, and confirm none of them run in the browser.” Make it show you the files.
3. Payment webhooks verified by signature
What to check: the endpoint that marks an order paid verifies the payment provider’s signature on every webhook call, using the endpoint’s signing secret. Your app grants access because the verified webhook says so — never because a success page loaded.
Why it matters: a webhook URL is just an address. Anyone can send it a fake “payment succeeded” message. If your code believes the message without checking the signature, a stranger can mint themselves a paid subscription with one request — the subscription bypass in the case above. The fix is built into every major provider’s tooling; Stripe, for example, signs every event, and its libraries include a verification call for exactly this check. The wider payment setup is covered in SaaS Payments: Stripe Managed Payments, Paddle and Polar.
How to verify: ask your builder: “Show me the webhook handler and the line where the signature is verified.” No verification line, no launch. Then run a test purchase in test mode and confirm the order only activates after the webhook fires — if deleting the webhook still lets orders complete, the success page is doing the trusting.
4. An authentication check on every API route
What to check: every API route that reads or changes user data first confirms who is calling and that the data belongs to them. “The frontend hides the button” is not a check.
Why it matters: routes are reachable directly, without your interface. If /api/orders/123 returns the order to anyone who guesses a number, your customers’ data is an enumeration exercise. This is the second half of most audit findings after RLS, and the two overlap: RLS is the database enforcing this rule even when a route forgets to.
How to verify: log out, then open your app’s API URLs directly in a private browser window. You should get an error, not data. Then change an ID in the URL while logged in as your test account and confirm you cannot reach the other account’s records. Ask the builder to show you the check inside two or three routes, not its promise that the check exists everywhere.
5. Rate limits on anything public — above all, AI endpoints
What to check: public endpoints cap how often one visitor can call them, and any endpoint that spends your money — AI generation, email sending, image processing — has a per-user limit and, ideally, a daily spending ceiling at the provider.
Why it matters: an unprotected AI endpoint is a free API for the internet, billed to you. Bots find these within days of launch. Rate limits turn a potential four-figure bill into a nuisance, and provider-side caps are the backstop when the limit code has a bug.
How to verify: ask the builder where limits are set and what the numbers are; then set the hard cap yourself in the provider’s dashboard — that one is in your hands, not the code’s. The general automation version of this thinking is in Automation Workflow Security.
6. Secrets out of the repository, and a rotation plan
What to check: your .env file is listed in .gitignore, no secret has ever been committed, and you know how to rotate each key if one leaks.
Why it matters: a key committed once lives in the repository’s history forever, even after you delete the line. Public-repo scanners find committed keys within minutes. Rotation is the only real remedy, so the time to learn where each key is reissued is before you need to do it at 2 a.m.
How to verify: run a search of your repo history for sk_live and service_role, or ask the builder to. If anything surfaces, rotate that key first and clean history second — in that order. While you are there, confirm your repository is private if it holds anything beyond code.
7. A backup you have restored at least once
What to check: your database is backed up on a schedule you did not have to set up by hand each time, and you have restored one backup into a test project and seen your data come back.
Why it matters: every item above reduces the chance of a bad day; this one decides whether a bad day is an incident or the end of the app. An untested backup is a hope, not a backup. Accidents do not require an attacker — one bad migration by your AI builder can delete the same table an attacker would have.
How to verify: do the restore. It takes twenty minutes, once, and it is the only verification on this list that cannot be delegated to a dashboard screenshot.
The 15-minute verification pass
Copy these prompts to your AI builder, one at a time, and require it to show file names and code, not summaries:
- “List every database table and whether RLS is enabled on it, with the policies for the users table quoted in full.”
- “Search the whole project for secret keys and show me every file that contains one. Which of those files ship to the browser?”
- “Show me the payment webhook handler. Point to the exact line that verifies the signature.”
- “Pick three API routes that return user data and show me the authentication check at the top of each.”
- “What rate limits exist on the AI endpoints, in numbers, and where are they set?”
Vague reassurance in reply to any of these is a finding in itself. A builder — human or AI — that did the work can show the work. This habit generalises: it is the same show-me standard that What a SaaS Starter Must Include applies to boilerplates, and the audit thinking in MCP Security Checklist applies to agent tooling.
What this checklist does not cover
It covers the failures that audits of small AI-built apps actually find. It does not make an app bulletproof: dependency vulnerabilities, account-takeover via weak password resets, and plain phishing of you, the owner, all sit outside it. If your app handles health, finance or children’s data, or takes serious money, pay for a professional review before launch — the honest version of this checklist ends where professional territory begins. And if you have not launched yet, Validate a Micro SaaS Idea Before Building is the cheaper problem to solve first.
FAQ
What is row level security in plain words? It is a set of rules stored in the database itself that decides, for every row, who is allowed to see or change it — typically “a user can only touch rows where the owner ID matches their own account.” Your app’s public key is safe to share only because these rules stand behind it. No rules, no protection, whatever the app code does.
My app has no users yet. Does this still matter? Yes, because the exposure starts at deployment, not at your first signup. Scanners probe new sites and public repositories continuously; the window between “live” and “found” is measured in hours, not in how famous your launch post gets.
Can’t I just ask the AI to “make it secure”? You can, and it will change things — you just cannot verify what it changed, which is the entire problem. The checklist works because every item has a check you can perform yourself: a dashboard state, a line of code you can point at, a test with a second account. Ask for the fix, then run the verification.
Which single item matters most? RLS, for Supabase apps: it is the most common critical finding in audits of AI-built apps and it protects the data even when other code makes a mistake. For apps not on Supabase, the equivalent question is item 4 — does every route check who is asking?
Is a paid starter or boilerplate safer than a from-scratch build? Usually somewhat, because auth and payments are pre-built — but “usually” is doing heavy lifting. Run the same checklist on a starter’s output; the criteria in Choosing a Next.js Boilerplate by Criteria include what to inspect before you trust one.
Verdict
The builders in the failure stories were not careless people; they shipped the way AI tools encourage you to ship — feature first, demo green, launch. The seven checks above are the difference between that app and one that survives its first month: RLS on, keys server-side, webhooks verified, routes checked, limits set, secrets out of git, one backup restored. Run the 15-minute pass today, before your launch post, not after your first strange invoice. If you are still at the building stage, Self-Hosting Your First Project covers the deployment side of doing this calmly and in the open.
Category: Claude Code & Context Engineering · Tags: #claude-code #security #ai-coding
Next step: this article is part of Claude Code guides, which covers the full topic from first setup to advanced use.