ShipSecurely: Pre-launch security checklist
Printable
Pre-launch security checklist
A single pass over the issues that most often ship in an AI-built app, before you send the URL to anyone else.
Print this page and tick the boxes, or paste the prompt at the bottom into the coding agent that built the app. Each line links to a longer guide. Educational guidance, not a security audit. Do the checks on a project you own.
Work top to bottom. If a line does not apply because you do not use that service, write "n/a" next to it and move on. Do not tick a line you did not check.
Server secrets belong in the host's environment. A variable whose name starts with NEXT_PUBLIC_ or VITE_ is copied into the browser bundle. The checks for that boundary are in How to deploy your vibe-coded app securely.
Data access
Every Supabase table the API can see has row level security on, and you can point at the policy that decides who reads a row.
A new Supabase table in public has an explicit GRANT for the role that should use it, in the same migration as row level security. GRANT ALL to anon with RLS off is not the fix for a 42501 error.
Supabase's Oct 30 change: new tables aren't exposed automatically
You ran the default privileges query from the Oct 30 guide. Each row lists only the privileges anon or authenticated gets automatically on new tables in public, and any of select, insert, update, or delete not listed needs an explicit GRANT. Every place that creates a table (migrations, scripts, an AI coding tool) adds the GRANT the app needs.
Supabase permission denied for table (42501) on a new table: what changed on October 30, 2026?
Firestore and Storage rules are not test mode and not allow-if-true. A signed-in user cannot read another user's documents.
User uploads sit in a private bucket. A logged-out browser cannot open another user's file URL.
Security Advisor shows no 0028 or 0029 finding you did not mean to keep. Every security definer function in public that anon or signed-in users should not call has EXECUTE revoked from PUBLIC and from those roles.
The migration that creates each new table in public also grants only the commands each role needs, enables row level security, and adds the policies. No table grants anon anything unless it is public on purpose.
Security Advisor shows no 0010, 0016, or 0002 finding you did not mean to keep. Every view in public that anon or signed-in users can select either has security_invoker on or is public on purpose, and no materialized view with private rows is selectable by public, anon, or authenticated.
Changing an id in the URL, as a second test user, does not return the first user's data.
Signing out and requesting a private API path returns 401. Hiding the button is not the only check.
Every Server Action that writes data loads the session inside the action and ignores user ids from the form.
If middleware or proxy is the login gate, its matcher does not skip /api unless every Route Handler and Server Action loads the session itself.
Secrets
The production JavaScript bundle does not contain a Supabase secret key, a Stripe secret key, or a model API key.
Server secrets are not in a NEXT_PUBLIC_ or VITE_ variable. Preview deploys do not use production credentials, and internal services do not have a public URL they do not need.
Git history does not contain a real .env or a private key. Anything that did has been rotated.
Requests for /.env and any debug route do not return configuration or secrets.
In Vercel's Environment Variables list, every private credential, such as a secret API key, access token, or database password, is labeled Secret, not Config. A publishable key shipped to the browser on purpose can stay Config. A private credential that was ever stored as Config or non-sensitive has been rotated.
If the app runs on Railway, every credential that was in a Railway variable has been rotated at the provider that issued it, not only changed in Railway, and the old key is revoked.
Money and abuse
The Stripe webhook rejects requests that fail signature verification and does not mark an order paid from unsigned JSON.
Checkout uses a price id from the server. The browser cannot set the amount, the plan, or an admin role.
Model calls require a signed-in user, have a per-user daily cap, and the provider dashboard has a monthly spend limit.
Login, password reset, and paid API routes return 429 when a caller repeats them too fast.
Injection and the browser
User input is not concatenated into SQL or into a Supabase .or() filter string.
User and model text is rendered as text, or sanitized with a maintained allowlist. No homemade HTML filter.
Tools the model can call check the session on the server. The model does not decide who the user is.
Uploads have a server-side size and type limit, a generated filename, and are not served as HTML or SVG from your origin.
Cookie-authenticated APIs do not reflect arbitrary Origin headers. There is an allowlist, or no CORS middleware at all.
Responses send nosniff, a referrer policy, and frame protection. HSTS is only set if the site is HTTPS-only.
Accounts and launch
Password reset uses the auth provider's email flow, or a long single-use token. It does not update a password from an email alone.
Session tokens, JWTs, and refresh tokens are not in localStorage or sessionStorage. An HttpOnly cookie is a server-only session. A cookie from @supabase/ssr is still readable by script.
The lockfile is committed, and you have read the current dependency audit instead of force-upgrading.
After an agent session, every new package name in the lockfile has a repository and a first publish date you looked up, and you did not approve an install script you did not read.
Privacy and terms pages exist, name the processors you actually use, and point at a contact address that reaches you.
If you run Cloudflare's security-audit skill, you set an agent-invocation budget before a full audit and you do not treat needs_validation as a confirmed bug.
If a coding agent says it secured the app, you asked it to list its findings first, and you checked row level security, views, keys in the bundle, and the provider spend limit yourself.
If an agent runs when an issue, comment, pull request, email, or webhook arrives, someone outside the team cannot put text into its prompt while it holds a token or a tool that writes or sends.
If GitHub code scanning is on, you have read each open alert, fixed the real ones in a pull request, and dismissed an alert only with the matching reason and a comment.
If you built the app for a client, every key lives in the client's accounts, each AI provider key has a spend limit, the client has a note on who rotates which key, and your access is removed after handoff.
On a Lovable app, every exposed table has a row level security policy, and no secret key is in a VITE_ variable.
On a Bolt app, secrets are not in VITE_ variables, and a Supabase client key is paired with row level security.
On a Replit app, credentials live in Secrets, not in source or in Configurations.
On a v0 app, NEXT_PUBLIC_ values are safe to ship, and a Supabase secret key is not in client code.
On a Bolt project that uses Vite, a VITE_ value is not a secret key. On a v0 project that uses Next.js, a NEXT_PUBLIC_ value is not a secret key. The Supabase publishable key can use that prefix only with row level security on.
Public env vars, the Supabase anon key, and row level security
Give the whole list to your agent
You are doing a pre-launch security pass on this repository. Do not add features. Do not claim the app is secure. Work through the list below and change code only where you can see the problem. If you are unsure, write a question instead of weakening a control. Check and fix what you can: 1. Supabase: enable RLS on public tables and replace policies of using (true). Do not use the secret key in client code or NEXT_PUBLIC_ variables. 2. Firebase: remove allow read, write if true. Scope rules to request.auth.uid and the owner field. 3. Storage: private buckets, owner-only prefixes, no user HTML or SVG served from this origin. 4. Every Route Handler and Server Action that reads or writes data must load the session inside the function and scope queries to that user. A middleware or proxy matcher that skips /api is not that check. Ignore userId, role, price, and plan from the client. 5. Stripe webhooks must verify the signature on the raw body. Prices must come from server-side price ids. Only the verified webhook grants a plan. 6. Model routes must keep the provider key on the server, require a user, and enforce a small per-user daily cap. Tell me to set a spend limit in the provider dashboard. 7. Add server-side rate limits on login, password reset, and paid routes. 8. Parameterize SQL. Render user and model text as text. Allowlist CORS origins. Add nosniff, referrer policy, and frame-ancestors none. 9. Password reset must not set a password from an email alone. 10. Do not print secrets. Tell me which keys I must rotate if they were committed or shipped to the browser. 11. Do not store session tokens, JWTs, or refresh tokens in localStorage or sessionStorage. An HttpOnly cookie is a server-only session. On a Supabase Next.js app, @supabase/ssr cookies are readable by script because the browser needs the refresh token. Use that helper instead of a storage key you invented, and do not describe it as HttpOnly. Call getUser() when a revoked session must be rejected. End with a checklist of what you changed, what you could not verify from the repo, and what I should click-test.