#057Technical3 min

Understand Supabase access rules

Distinguish row policies, privileged keys and public storage, then interpret read-only evidence.

Hackaiz team · updated 21/11/2026

Illustration: a founder builds an AI app.
Illustration: a founder builds an AI app. Illustrative photo, not a screenshot.

01Access rules protect rows, not just screens

Supabase Row Level Security, abbreviated RLS, applies rules to database rows. It addresses a different problem from hiding a button or asking someone to sign in. A signed-in customer should not automatically be able to read another customer’s records. Before reviewing a policy, write down the expected relationship between the person making the request and the row they want to read, such as the owner of an invoice or a member of the relevant organization.

A useful review separates three cases: a visitor who is not signed in, an ordinary account, and a privileged server process. A table may deliberately contain public information, but an invoices or private-profiles table usually needs a narrower rule. Hackaiz examines accessible tables within the authorized scope; it cannot infer your business intention from a table name alone. Explain which records are meant to be public when deciding what a response means.

02Check policies, keys and storage separately

The Supabase guide identifies disabled RLS and policies that let every logged-in user read other users’ rows as common mistakes. Merely seeing that RLS is enabled does not establish that the policy is restrictive enough. Also consider whether a person can edit a profile field that grants an administrative role. A rule that protects reading but allows an inappropriate privilege change leaves a different access problem unresolved.

The service-role key is a separate boundary: it must not be committed or shipped in browser code. Do not confuse it with a public client key or place it in the browser to work around a policy error. Storage also deserves its own review. A public bucket can be correct for public images and wrong for private customer attachments. Database row rules are not evidence that a publicly accessible file was intended to be shared.

03Prepare an authorized Supabase review

From Analyze, use the Connect your system path for Supabase or database access; the connection flow returns you to the analysis setup. Authorized repository review can examine SQL migrations and policies. Live Supabase checks send read-only anonymous requests and record responses. With owner approval, a read-only database connection allows review of roles, tables and operations in a matrix. Database checks do not write, delete or modify the data.

Before website or API analysis, establish domain ownership using the _hackaiz DNS TXT record, the HTTPS file /.well-known/hackaiz-verification.txt, or the project AI instruction that creates the file. This requirement is separate from approving database access. Select the checks you intend to run: unticked checks are not executed or billed, while launched checks use credits. Do not submit a privileged secret in an ordinary support message to explain a suspected exposure.

  1. 1List tables and storage locations that should contain private information.
  2. 2Describe which account or role should read the records.
  3. 3Connect the authorized source and approve read-only database access if needed.
  4. 4Compare policy definitions and observed responses with your intended access rules.

04Interpret evidence without overgeneralizing

A 401 response shows that the particular request was refused. It does not prove all access paths are protected, nor does it demonstrate what a second authenticated user can read. Returned rows require a different question: were these rows intentionally public? Keep the request context, affected table and response together when interpreting the result. A missing or unperformed check is not a successful access-control test.

Findings in the application report are grouped as Danger, To fix and To watch. Use those groups to organize review, then inspect the evidence before changing a policy. Proposed GitHub repairs are draft pull requests that require human review and approval, with no automatic merge. Review the resulting access behavior with your team before deployment; a narrower rule can still break a legitimate workflow if it does not match your business model.

Frequently asked questions

Was this article helpful?

Related articles