What security checks should I do before launching?
Last checked 31 Aug 2026
Short answer
Run Lovable's Security scan, verify RLS on every table, confirm secrets are server-side, check auth flows and admin permissions, and re-test payments before you Publish.
Core checklist
- Run the Security scan — open the project's Security view and resolve flagged issues (exposed keys, missing RLS, vulnerable dependencies).
- Verify RLS on every table — every table holding user data needs a policy; roles must live in a separate
user_rolestable. See /questions/how-do-i-test-rls. - Check for exposed secrets — no API keys in front-end code; see /questions/how-do-i-check-for-exposed-environment-variables.
- Test auth flows — sign-up, login, password reset, and that a logged-out user can't reach protected routes or data.
- Test admin/role permissions — a regular user account should not be able to reach admin-only actions by URL or API call, not just by hidden UI.
- Re-test payments in live mode with a real small transaction if you use Stripe, and confirm webhooks are verified server-side.
- Check console errors and broken links across the published preview, not just localhost.
A prompt to run the whole pass
Before I publish, review this project for security: check RLS policies on all tables, confirm no secrets are exposed in front-end code, and check that admin-only actions are properly restricted server-side. Report what you find without changing anything.
What usually goes wrong
- Testing only as the account that built the app (which is usually an admin) and never trying a plain user or logged-out session against the same URLs.
- Assuming hiding a button in the UI is the same as restricting the action — it isn't; the server/database must enforce it.
- Leaving test/sandbox API keys (Stripe, email) live at launch.
- Skipping a final scan after last-minute feature changes, which is exactly when new gaps get introduced.
Table: quick priority order
| Priority | Check |
|---|---|
| High | RLS on every table, no exposed secrets |
| High | Admin actions blocked server-side for non-admins |
| Medium | Auth flows (sign-up, reset) work end to end |
| Medium | Payments tested in a real flow |
| Lower | Console errors, broken links, SEO basics |
For a second pair of eyes before a business-critical launch, PromptSites.com offers pre-launch reviews.
Sources
Was this answer helpful?
Related questions
- AnswerHow do I check Supabase RLS?Ask Lovable to list every table and its row-level security status and policies in plain language — Lovable Cloud users don't have Supabase dashboard access, so this has to go through chat.
- AnswerHow do I prevent spam registrations?Verify email addresses on sign-up, add a CAPTCHA to the registration form, rate-limit sign-up attempts per IP, and check the token server-side before creating an account.
- AnswerHow do I stop bots?Add a CAPTCHA (e.g. Cloudflare Turnstile) to public forms, validate inputs server-side, and rate-limit submissions — client-side-only checks like a hidden field are easy for real bots to bypass.
- AnswerWhere should secrets be stored?In your project's server-side secrets store, used only inside Edge Functions — never in front-end code, client-side environment variables, or committed to your Git repository.