How Supabase RLS audit tools find exposed tables and help fix access rules

A Supabase RLS security audit tool finds tables with Row Level Security switched off and access rules that expose private data. Checks can also flag leaked keys, public file storage and API risks, helping catch unwanted access before an app reaches production.1, 2
Why Supabase Row Level Security fails
Tables are created with RLS switched off, so rows remain exposed unless protection is turned on. AI builders can create tables faster than they secure them. An app may work in preview while its live API exposes users, orders, messages and documents.3, 2
A rule can look sound yet still allow unwanted access. Broad rules, missing write checks and rules based on user data that clients can edit leave gaps.3
Attackers can find a Supabase project by viewing a site's source code. Searching for supabase.co reveals the project address.2
Poor RLS settings have exposed personal data, including email addresses. Services released without enough care over data handling face a higher risk of leaks.4
The Lovable data breach involved the issues behind CVE-2025-48757. SimplyScan checks for those same issues.5
What a Supabase security scanner checks
Some tools watch browser requests and extract API keys from their headers. They spot Supabase requests through the .supabase.co/rest/v1/ URL pattern.4
Other tools find the project in a deployed app's bundle. They use the anon key to probe public tables for exposed rows.2
One browser checker runs select * limit 30 for each table. It flags RLS as disabled when that query returns at least 30 records.4
A returned row needs to be judged against the table's real access needs. Some tables have RLS switched off on purpose, and scans can raise false alarms.4
Policy checks look for rules that allow too much access. Warning signs include USING (true) and missing WITH CHECK clauses.1, 3
RLS may be enabled while a rule still lacks a user filter through auth.uid(). Read access can also reveal email addresses, phone numbers or other private fields to every requester.2
Storage checks look for buckets that are public by mistake. Those buckets may hold invoices, uploads or exports even when table policies have received care.1, 3
Exposed storage can reveal identity documents and other sensitive files. Table rules do not remove the need to check bucket access.2, 3
A leaked service_role key bypasses RLS entirely. If it reaches the browser, table policies cannot block access made with that key.3, 2
Token checks verify whether JWT tokens are valid or expired. The browser checker warns when a token has expired.4
How to fix and verify RLS policies
Enable RLS on each table that needs row access rules. Forcing RLS also applies those rules to table owners, guarding against later role changes.2
Read rules can match auth.uid() to the row's user_id through a USING clause. That limits signed-in users to their own rows.2
Insert rules use a matching WITH CHECK clause so users create only rows they own. Update rules need both clauses to limit edits and prevent changes of ownership.2
Delete access needs its own explicit rule, separate from update access. The policy's ownership field must match the ownership model the app actually uses.2
Views marked SECURITY DEFINER run as the owner and ignore the caller's RLS context. Functions with that setting can also bypass table policies.2, 3
Use SECURITY INVOKER for views on Postgres 15 or later to apply the caller's access rights. Another option is to rewrite the view as a function with row filters.2
After a policy change, use curl to query the REST endpoint with the anon key. For a private table, that request should return an empty array rather than rows.2
Repeat the request with a real user's JWT token. That call should return only that user's rows; an anon call returning rows shows the rule is not filtering.2
A release check can inspect pg_tables for public tables whose rowsecurity value is false. The check raises an error if it finds a public table with RLS switched off.2
For CI, apply schema changes to a branch database or local Supabase, then seed two users with sample rows. Run anon and cross-user probes, and fail on row counts that differ from the expected result.2
Keep the probe script beside the schema changes so policies and checks change together. Remove temporary USING (true) rules and require that follow-up in each schema review.2
Auditing with SimplyScan
SimplyScan is a site health scanner powered by the SimplyScan Security Engine. Its checks include Supabase RLS, exposed API keys and auth risks.
SimplyScan grades eight areas in one pass, including speed, threat exposure, SEO and AI visibility. The other areas cover access needs, GDPR signals, domain health and email security.
SimplyScan's free scans require a free account and run in 30 seconds. A free scan includes two rescans within 14 days.
SimplyScan accepts a web app or GitHub repo and flags missing RLS and unprotected database tables. Each finding includes a copy-and-paste fix prompt for an AI editor.5
SimplyScan's repo scans also look for hardcoded secrets and flaws in dependencies. Reports include exact fixes, code examples and AI fix prompts.5
SimplyScan runs an MCP server so Claude, Cursor and Windsurf can scan from inside an editor. It uses a remote Streamable-HTTP connection at https://api.simplyscan.io/mcp.6
Sign in and create a free account API key in Settings to use the MCP server. A Pro purchase or active Pro Monitoring plan unlocks Pro scans.6
SimplyScan's MCP tools include website scans, exposed-file checks and local code scans. They also cover headers, AI visibility, SEO, SSL and email security.
SimplyScan unlocks a trust badge for scores of 80 or higher with no critical or high-severity findings. The badge links to a public page showing the score and scan date.7
Any qualifying free or Pro scan can earn the badge at no charge. Rescan after changes to refresh the score shown on the badge.7
SimplyScan Pro Monitoring adds scheduled rescans, uptime checks and status pages. SimplyScan can push findings to Slack, GitHub Issues or Linear.5
Sources
Frequently asked questions
Is your app secure? Run a free security scan in 30 seconds · free account required.
Scan your app free →