Back to Checks
Supabase project enforces SSL on database connections
database_ssl_enforcement_enabled
Service: databaseSeverity: high
OfficialVerifiedPrivate
Categories:encryption
Resource Type:SupabaseProject
Checks that the project enforces SSL on incoming Postgres connections, so clients cannot connect without encryption.
Risk
Without SSL enforcement, clients may connect in plain text. Credentials and query results then travel unencrypted and can be read or changed by anyone on the network path.
Run this check with Prowler
Run in Prowler CloudInstall
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_ssl_enforcement_enabledRecommendation
Enforce SSL on incoming database connections and configure clients to verify the server certificate.
Remediation
Other
1In the Supabase dashboard, open Project Settings > Database
2Under SSL Configuration, turn on Enforce SSL on incoming connections
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
class database_ssl_enforcement_enabled(Check):
def execute(self) -> list[CheckReportSupabase]:
findings = []
for project in database_client.projects:
if project.ref not in database_client.ssl_enforced:
continue
report = CheckReportSupabase(metadata=self.metadata(), resource=project)
if database_client.ssl_enforced[project.ref]:
report.status = "PASS"
report.status_extended = (
f"Project {project.name} enforces SSL on database connections."
)
else:
report.status = "FAIL"
report.status_extended = f"Project {project.name} does not enforce SSL on database connections."
findings.append(report)
return findings