Back to Checks
Prowlerprowler-provider-supabase
Supabase extension is not installed in the public schema
database_extension_not_in_public_schema
Service: databaseSeverity: low
OfficialVerifiedPrivate
Categories:trust-boundaries
Resource Type:SupabaseDatabaseObject
Reports extensions installed in the public schema, as found by the Security Advisor (lint extension_in_public).
Risk
Objects an extension creates in the public schema are exposed through the Data API and share a namespace with your tables, which can expose functions you did not mean to publish.
Run this check with Prowler
Run in Prowler CloudRun
prowler supabase --checks database_extension_not_in_public_schemaRecommendation
Install extensions in a dedicated schema such as extensions, for example ALTER EXTENSION <name> SET SCHEMA extensions;
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_extension_not_in_public_schema(Check):
def execute(self) -> list[CheckReportSupabase]:
return security_lint_findings(self, database_client)