Back to Checks
supabase

Supabase Storage bucket is not public

storage_bucket_public_access_disabled
Service: storageSeverity: medium
OfficialVerifiedPrivate
Categories:internet-exposed
Resource Type:SupabaseStorageBucket

Checks that Storage buckets are not public. Anyone with the URL can download the files in a public bucket.

Risk

Files in a public bucket bypass Storage access policies. Anyone who learns or guesses a file URL can download it, which can leak private documents and user uploads.

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 storage_bucket_public_access_disabled

Recommendation

Keep buckets private and use signed URLs. Mute this finding for buckets meant to serve public assets.

Remediation

Other

1In the Supabase dashboard, open Storage
2Edit the bucket and turn off Public bucket
3Serve files with signed URLs or through RLS-protected downloads

Check Code

from prowler.lib.check.models import Check

from prowler_provider_supabase.check_report import CheckReportSupabase
from prowler_provider_supabase.services.storage.storage_client import storage_client


class storage_bucket_public_access_disabled(Check):
    def execute(self) -> list[CheckReportSupabase]:
        findings = []
        for bucket in storage_client.buckets:
            report = CheckReportSupabase(metadata=self.metadata(), resource=bucket)
            if not bucket.public:
                report.status = "PASS"
                report.status_extended = (
                    f"Bucket {bucket.name} in project {bucket.project_name} is private."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Bucket {bucket.name} in project {bucket.project_name} is public: "
                    "anyone with a file's URL can download it."
                )
            findings.append(report)
        return findings