StackAttestTechnical Trust
AI builders

Is Supabase safe for production? Yes, once you do your half

Updated November 15, 20269 min read
Short answer

Yes, as a platform. Supabase states it is SOC 2 Type 2 compliant, ISO 27001 certified and HIPAA compliant with a signed agreement, and it encrypts data at rest and in transit. Your project is safe for production once your half is done: row level security on every exposed table, policies that scope rows to their owner, the service role key kept out of the browser, and storage rules checked.

Mapped toOWASP ASVS 5OWASP API Security Top 10CWE

Supabase's own security page draws the line plainly: Supabase secures the infrastructure, and you secure your application, meaning your row level security policies, API keys and access controls. Nearly every Supabase data exposure in the news happened on the customer's side of that line.

What Supabase secures

  • SOC 2 Type 2 compliance, with the report available to Team and Enterprise customers through the dashboard.
  • ISO 27001 certification.
  • HIPAA compliance, with a Business Associate Agreement available to Team and Enterprise customers, which healthcare data requires.
  • Encryption of all customer data at rest with AES-256 and in transit over TLS, with access tokens and keys encrypted again at the application level.

That is a strong platform. None of it decides who may read a row in your tables, because the browser talks to your database directly, and the only thing standing between a visitor and your data is the rules you wrote.

What you have to secure before production

1. Row level security on every exposed table

Any table in an exposed schema without row level security can be read by anyone holding the public key, and the public key ships in your app by design. The dashboard's table editor prompts you to enable it, but tables created by SQL, a migration or an AI app builder often arrive without it.

2. Policies that scope rows to an owner

Enabling row level security without a policy denies everything. A policy that only checks that a user is signed in allows everyone who signed up, which with open sign-up means anyone. The policy that protects data compares the row's owner column to auth.uid(), separately for selecting, inserting, updating and deleting.

3. The two keys, kept apart

The anon or publishable key is meant to be public and is safe when the policies are right. The service role or secret key bypasses every policy and must never reach the browser. Search your deployed site's loaded sources for service_role, and if it was ever exposed, rotate it: deleting it from the code does not recall the copies already downloaded.

4. Storage buckets

Storage has its own policies, separate from your tables, and a public bucket serves every file in it to anyone with the address. Check which buckets are public and whether that was a decision or a default.

5. Database functions marked security definer

A function marked security definer runs with its creator's privileges, not the caller's, and functions in an exposed schema can be called from the browser. Each one should check who is calling it and set its search path, or move to a schema the API does not expose.

6. The Security Advisor

Supabase's dashboard includes a Security Advisor that flags common problems, such as tables with row level security disabled. Run it and clear what it reports. It finds missing rules quickly. It cannot tell you whether a rule that exists allows the right people.

Test it the way an outsider would

  1. Open a private browser window and take only the public key from your app.
  2. Request each table through the REST endpoint at your-project.supabase.co/rest/v1/ followed by the table name, sending the public key in the apikey header.
  3. Any rows that come back without signing in are readable by everyone on the internet.
  4. Repeat signed in as an ordinary user, asking for rows that belong to another user. Rows coming back means a policy scopes nothing.

Is Supabase safe for production, then?

Yes, when your half is done and tested. Teams run production apps on Supabase every day, and the ones that end up in the news almost always skipped row level security or shipped the wrong key. If your app holds health, financial or customer data, have the configuration checked by someone outside the team before launch.

Work through every table, policy, key and bucket with the free checklist.Use the RLS checklist

When you need evidence someone else will accept, StackAttest tests these controls against named standards and records how strongly each result was established.

See what an independent Supabase security audit covers.Supabase security audit

Frequently asked questions

Is Supabase secure enough for a startup?

Yes. The platform carries the certifications larger buyers ask about, and the controls that protect your data are free on every plan. What decides whether a startup's project is secure is whether row level security is enabled and correct, which is work, not a plan upgrade.

Is Supabase more secure than Firebase?

Neither is safer by default in the way that matters for your app. Both let the browser talk to the database directly, and both depend on rules you write: row level security policies in Supabase, security rules in Firebase. The safer one is the one whose rules you have tested.

Is it safe to expose the Supabase anon key?

Yes, that key is designed to be public, provided row level security is enabled and correct on every table it can reach. The service role key is the opposite: it bypasses every policy and must never be in the browser.

Is Supabase HIPAA compliant?

Supabase states that it is HIPAA compliant and signs a Business Associate Agreement with Team and Enterprise customers, which healthcare data requires. Whether your app is compliant still depends on how you configure access to that data.

Is Supabase safe from SQL injection?

Its client libraries and REST layer send parameterised queries, so ordinary queries are not injectable. The risk returns inside your own database functions if they build SQL by joining strings, which is worth checking in any function you wrote or generated.

Keep reading

Is Lovable safe? The platform, and the app you built on it

Guide · 10 min

Is Bolt.new safe? What the platform secures and what you must

Guide · 8 min

Who can check your AI-built app before launch, and how

Guide · 12 min

The vibe coding security checklist: 12 checks before you ship

Article · 9 min