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 protect API keys?Never put API keys in front-end code — store them as secrets used only inside server functions (Edge Functions), where the browser never sees them.
- AnswerAre Lovable websites secure?Lovable includes built-in security scanning and API-key protection, but real security also depends on you setting up row-level security and role checks correctly — it isn't automatic just because you used Lovable.
- 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.
- AnswerHow do I run a security audit on Lovable?Open your project's Security view in Lovable to see automated scan results, then ask Lovable in chat to review RLS policies, role storage, and any exposed secrets in detail.