Keep the security controls effective
What to preserve, what to configure and what to test before launch.
Updated December 2, 2026
Security is an ongoing responsibility
The SaaS starter includes authentication, role and ownership checks, RLS policies, server-side validation, rate limits and signed payment handling. The website kit includes validated enquiries, consent, spam controls and private lead storage when configured. These controls are not an independent security audit or a guarantee that every future modification is safe.
Do these things
- Store real secrets in ignored local environment files and private host variables. Keep database server keys, webhook secrets and model API keys server-only.
- Apply migrations to your own project. Keep RLS on for private tables, and preserve explicit server-side checks when using a service key that bypasses RLS.
- Test two accounts: one must not read, update or download the other’s private data simply by changing an ID.
- Check payment signatures on raw request bodies. Confirm product, amount, currency and customer on the server. Handle retries and cancellation/refund state.
- Use HTTPS in production. Configure trusted origins and callback URLs. Keep dependencies updated and review relevant security advisories.
- Limit AI/provider spending and protect public form endpoints from abuse. Back up production data and test restoration.
Do not do these things
- Do not put real secrets in
.env.example, screenshots, AI prompts, public repositories or downloadable ZIPs. - Do not disable RLS, CSRF/origin validation, permissions or rate limits because an integration is failing.
- Do not use a browser query parameter or local-storage flag as proof of payment or a privileged role.
- Do not assume hiding a button protects the route behind it.
- Do not send real customer data to an AI model without a lawful, disclosed purpose and the appropriate provider arrangement.
If a credential leaks
Revoke or rotate it at the provider, replace it in your private deployment settings and inspect logs for misuse. Removing it from the latest commit does not erase copies or Git history. Assess affected customer data and meet any applicable notification obligations.
Before each release
Run the kit’s documented tests and build, then test the actual deployed user journeys. Recheck roles, data isolation, payment failure/retries, email delivery and form spam controls after related changes. Get an experienced review for sensitive custom features.