Back to Checks
supabase

Supabase table exposed through the Data API has Row Level Security enabled

database_table_rls_enabled
Service: databaseSeverity: critical
OfficialVerifiedPrivate
Categories:internet-exposed
Resource Type:SupabaseDatabaseObject

Reports tables in schemas exposed through the Data API that do not have Row Level Security (RLS) enabled, as found by the Supabase Security Advisor (lint rls_disabled_in_public).

Risk

Anyone holding the project's public API key can read, change and delete every row of a table without RLS. The public key ships in every client app.

Run this check with Prowler

Run in Prowler Cloud
Install
pip install --extra-index-url https://__token__:${PROWLER_REGISTRY_DOWNLOAD_API_KEY}@registry.prowler.com/simple/ "prowler-provider-supabase[runtime]"
Run
prowler supabase --checks database_table_rls_enabled

Recommendation

Enable RLS on every table in an exposed schema and add policies that grant only the access each role needs.

Remediation

Other

1In the Supabase dashboard, open the project
2Go to Advisors > Security Advisor
3Open the issue and follow its remediation
4Rerun the advisor to confirm the issue is gone

Check Code

from prowler.lib.check.models import Check

from prowler_provider_supabase.check_report import CheckReportSupabase
from prowler_provider_supabase.services.database.database_client import database_client
from prowler_provider_supabase.services.database.database_security_advisor import (
    security_lint_findings,
)


class database_table_rls_enabled(Check):
    def execute(self) -> list[CheckReportSupabase]:
        return security_lint_findings(self, database_client)