Back to Checks
Prowlerprowler-provider-supabase
Supabase table with RLS policies has Row Level Security enabled
database_table_rls_enabled_with_policies
Service: databaseSeverity: high
OfficialVerifiedPrivate
Categories:internet-exposed
Resource Type:SupabaseDatabaseObject
Reports tables that have RLS policies but do not have Row Level Security enabled, so the policies are ignored, as found by the Security Advisor (lint policy_exists_rls_disabled).
Risk
The policies suggest the table is protected, but with RLS disabled none of them apply and every role with table grants sees and changes every row.
Run this check with Prowler
Run in Prowler CloudRun
prowler supabase --checks database_table_rls_enabled_with_policiesRecommendation
Enable Row Level Security on the table so its policies take effect.
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_with_policies(Check):
def execute(self) -> list[CheckReportSupabase]:
return security_lint_findings(self, database_client)