SaaS Security Checklist: 10 Technical Checks Every Founder Must Run Before Launch
The step-by-step technical checklist to audit and secure any SaaS in production or before launch: Supabase RLS, private API keys, IDOR vulnerabilities, Stripe webhooks, and rate limiting.
Launching a SaaS application without a baseline security posture exposes your data to automated bots, credential stuffers, and unauthorized cross-tenant leaks. This practical pre-launch security checklist covers the 10 non-negotiable checks to lock down before taking paying users: PostgreSQL Row-Level Security, secret isolation, IDOR protection, Stripe webhook signature verification, and rate limiting.
1. The 10-Point Pre-Launch SaaS Security Matrix
Here is the comprehensive matrix of technical controls every SaaS engineering team must verify before onboarding production customers:
| Security Domain | Mandatory Technical Control | Failure Impact | Verification Test / Command |
|---|---|---|---|
| 1. Data & RLS | Enable Row-Level Security on 100% of public database tables | Total database leak via public REST API | SQL query against pg_tables |
| 2. Client Secrets | Ban private keys (Stripe, OpenAI) from client bundles | Drained API credits and hijacked billing | Client bundle inspection and npx validra-check |
| 3. Authentication | Argon2id or bcrypt hashing with httpOnly cookies | Session hijacking via XSS injection | Inspect Set-Cookie response headers |
| 4. IDOR Authorization | Filter by session tenant_id on every Server Action | Cross-tenant document theft | Manual two-account test harness |
| 5. Rate Limiting | Strict rate limits on login and password reset routes | Automated credential stuffing attacks | 100-request curl benchmark |
| 6. Payment Webhooks | Verify cryptographic Stripe webhook signatures | Spoofed subscriptions and free service access | stripe.webhooks.constructEvent |
| 7. Object Storage | Private-by-default S3 and Supabase storage buckets | Anonymous public document downloads | Direct unauthenticated HTTP request |
| 8. HTTP Headers | Enforce HSTS, CSP, and X-Content-Type-Options | Traffic sniffing and MIME confusion | curl -I on your production domain |
| 9. Input Validation | Strict server-side schema validation using Zod | Injection of corrupted or unexpected payloads | Zod schemas on all mutation routes |
| 10. Backups & DR | Automated daily encrypted snapshots with tested restore | Irreversible database loss upon failure | Staging restore drill |
A 2025 security assessment across 1,645 AI-built SaaS applications identified that over 10% exposed sensitive database tables directly to unauthenticated visitors due to omitted Row-Level Security.
2. Checks 1 to 3: Database RLS, Policies, and Environment Secrets
In PostgreSQL and Supabase, Row-Level Security is disabled by default when creating new tables via manual SQL migrations. Anyone holding the anon public API key can read and mutate table rows if policies are missing.
- Check 1: Ensure every public table executes
ALTER TABLE ... ENABLE ROW LEVEL SECURITY. - Check 2: Never deploy a
USING (true)policy to production without strict filtering on the authenticated user sessionauth.uid(). - Check 3: Audit your environment variables. In Next.js, any variable with the
NEXT_PUBLIC_prefix is compiled directly into the client bundle. Private Stripe keys (sk_live_) and database service role tokens must never include this prefix.
-- Query all tables with Row-Level Security disabled
SELECT tablename, rowsecurity
FROM pg_tables
WHERE schemaname = 'public'
AND rowsecurity = false;3. Checks 4 to 6: Authentication, IDOR Prevention, and Webhooks
Most critical SaaS vulnerabilities do not stem from underlying cloud infrastructure flaws, but from authorization loopholes within custom application code.
- Check 4: On every Server Action or API mutation, verify that the requested object belongs to the active session tenant. Never trust client-supplied resource IDs without ownership validation.
- Check 5: Enforce rate-limiting on sensitive endpoints including login, account creation, and password resets to defeat automated dictionary attacks.
- Check 6: Cryptographically verify incoming webhook signatures from Stripe or third-party gateways before updating user subscription records.
/* Production-grade Stripe webhook signature verification in Next.js */
import { headers } from "next/headers";
import Stripe from "stripe";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
export async function POST(req: Request) {
const body = await req.text();
const signature = (await headers()).get("stripe-signature");
if (!signature) {
return new Response("Missing signature", { status: 400 });
}
let event: Stripe.Event;
try {
event = stripe.webhooks.constructEvent(
body,
signature,
process.env.STRIPE_WEBHOOK_SECRET!
);
} catch {
return new Response("Invalid webhook signature", { status: 400 });
}
/* Securely process the verified event */
return new Response(JSON.stringify({ received: true }), { status: 200 });
}4. Checks 7 to 10: Storage, Security Headers, Zod, and Backups
The final four checks protect system resilience and safeguard corporate data against eavesdropping.
- Check 7: Verify that storage buckets containing private invoices or user uploads are private by default rather than public.
- Check 8: Enforce strict security headers including
Strict-Transport-Security,X-Content-Type-Options: nosniff, and an appropriateContent-Security-Policy. - Check 9: Parse and validate all incoming request bodies using Zod schemas to reject malformed or poisoned inputs automatically.
- Check 10: Configure daily encrypted database backups and execute a full restoration test in a staging environment before accepting your first paid subscription.
You can test your application for public secret leaks and unprotected Supabase tables in one minute using the open-source CLI: npx validra-check https://your-app.com.
Frequently asked questions
What is the most common vulnerability found before a SaaS launch?
Missing PostgreSQL Row-Level Security (RLS) on newly created tables, or overly permissive USING (true) policies that expose customer records via public API endpoints.
How do I check if my secret keys are leaked in client code?
Open your browser developer tools (F12), inspect loaded JavaScript sources for prefixes like sk_live_, sb_secret_, or service_role, or run npx validra-check https://your-app.com.
Why are automated vulnerability scanners insufficient before launch?
Automated vulnerability scanners only check package versions and basic syntax flaws. They cannot evaluate multi-tenant authorization logic or determine whether User A can view User B's invoices.
When should a startup book a formal Validra Security Review?
A Validra Security Review is recommended right before launching or when closing initial B2B contracts. It provides hands-on manual verification and a review confirmation letter in about 5 business days, from €395.
Is your SaaS secured against real attacks?
Identify critical vulnerabilities before your users do with the Validra Security Review in 5 business days.
See the Validra SaaS security audit →