Back to Checks
Prowlerprowler-provider-supabase
Supabase table with Row Level Security enabled has policies
database_table_rls_has_policies
Service: databaseSeverity: low
OfficialVerifiedPrivate
Categories:trust-boundaries
Resource Type:SupabaseDatabaseObject
Reports tables with Row Level Security enabled but no policies, as found by the Security Advisor (lint rls_enabled_no_policy).
Risk
A table with RLS and no policies denies every Data API request. This is safe, but it usually means a policy is missing, and the common workaround is to disable RLS altogether.
Run this check with Prowler
Run in Prowler CloudRun
prowler supabase --checks database_table_rls_has_policiesRecommendation
Add policies that grant each role the access it needs, or confirm the table is meant to be reachable only with the service role.
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_has_policies(Check):
def execute(self) -> list[CheckReportSupabase]:
return security_lint_findings(self, database_client)