Skip to content

Supabase checklist

Copy this list into a pull request, design review or project kickoff and tick what applies. Rules are grouped by level and sorted by score (criteria). Each links to the file that explains it and cites its sources. Automatable names tools that can check the rule in CI (see the file's "How to enforce" section).

Also apply the general checklist.

This file is generated by python3 scripts/rank.py fix from the guidelines. Don't edit it by hand.

  • SUPABASE-1 (10) Enable Row Level Security on every table in an exposed schema, such as public, and grant the anon and authenticated roles only the operations your app needs. (specific/supabase) Automatable: supabase test db, Supabase Advisors.
  • SUPABASE-2 (9) Never create security definer functions in an exposed schema, set search_path = '' on every one, and create views with security_invoker = true or keep them out of exposed schemas. (specific/supabase) Automatable: Supabase Advisors.
  • SUPABASE-8 (9) Put only the publishable key, or the legacy anon key, in clients, and keep secret keys and the service_role key in servers and Edge Functions, out of source control. (specific/supabase) Automatable: GitHub secret scanning push protection.
  • SUPABASE-3 (8) Write a separate policy for each operation, name its role with to authenticated or to anon, compare owner columns with (select auth.uid()), add with check to insert and update policies, and base authorisation on app_metadata, never on user_metadata, which users can change themselves. (specific/supabase) Automatable: supabase test db, Supabase Advisors.
  • SUPABASE-10 (8) Make every schema change, including RLS policies, grants and functions, a migration file in supabase/migrations under version control, and never change the production database directly in the dashboard. (specific/supabase)
  • SUPABASE-11 (8) Plan backups for your recovery point objective: Supabase backs up only paid-plan projects daily, so on the Free plan export the database regularly with supabase db dump --remote (CLI 3 dumps the local stack without --remote) and keep the copies off-site, and on paid plans enable point-in-time recovery when losing up to a day of data is too much. (specific/supabase)
  • SUPABASE-4 (7) Test the policies of every table with pgTAP: a test file per table under supabase/tests that asserts which operations each role may and may not perform, run with supabase test db on every pull request. (specific/supabase) Automatable: supabase test db.
  • SUPABASE-5 (7) Index every column that policies filter on, and wrap auth.uid() and auth.jwt() in a select so that Postgres evaluates them once per statement instead of once per row. (specific/supabase) Automatable: Supabase Advisors.
  • SUPABASE-6 (7) If you enable anonymous sign-ins, check the is_anonymous claim in restrictive policies on data that only permanent users may reach, and protect the sign-in endpoint with CAPTCHA. (specific/supabase) Automatable: supabase test db, Supabase Advisors.
  • SUPABASE-7 (7) Keep Storage buckets private unless every file in them may be public, control access with policies on storage.objects, for example per user folder, and give temporary access to private files with signed URLs. (specific/supabase) Automatable: supabase test db, Supabase Advisors.
  • SUPABASE-9 (7) Check every caller of an Edge Function: keep verify_jwt on for functions that users call, and query with the client that applies their RLS policies; use the admin client, which bypasses RLS, only for work that must cross policies, and verify the signature of external webhooks. (specific/supabase)
  • SUPABASE-12 (7) Connect each runtime the way Supabase recommends: clients through the Data API, serverless and edge functions through the shared pooler in transaction mode, with prepared statements off and a pool of one connection per instance, and migrations, pg_dump and long-running backends through a direct connection or the pooler's session mode. (specific/supabase)
  • SUPABASE-13 (7) Turn on SSL enforcement and network restrictions for the database. (specific/supabase)
  • SUPABASE-15 (7) Configure Supabase Auth for production: turn on email confirmations, send auth email through your own SMTP server, enable CAPTCHA on sign-up, sign-in and password reset, let one-time passwords expire within an hour, and review the rate limits. (specific/supabase)
  • SUPABASE-14 (6) Leave the Spend Cap on, or watch the organization's usage page when it's off, so that an attack or a bug can't run up unlimited charges. (specific/supabase)