Back to Checks
supabase

Supabase Auth requires passwords of a minimum length

auth_password_min_length
Service: authSeverity: medium
OfficialVerifiedPrivate
Categories:identity-access
Resource Type:SupabaseAuthConfig

Checks that Supabase Auth requires passwords of at least 8 characters. The threshold is configurable with min_password_length.

Prowler logoProwlerprowler-provider-supabase

Risk

Short passwords fall quickly to brute-force and credential stuffing attacks, which lets attackers take over user accounts.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler supabase --checks auth_password_min_length

Recommendation

Require a minimum password length of at least 8 characters.

Remediation

Other

1In the Supabase dashboard, open Authentication > Sign In / Providers > Email
2Set Minimum password length to 8 or more
3Save

Check Code

from prowler.lib.check.models import Check

from prowler_provider_supabase.check_report import CheckReportSupabase
from prowler_provider_supabase.services.auth.auth_client import auth_client


class auth_password_min_length(Check):
    def execute(self) -> list[CheckReportSupabase]:
        findings = []
        min_length = auth_client.audit_config.get("min_password_length", 8)
        for config in auth_client.auth_configs:
            if not config.has("password_min_length"):
                continue
            report = CheckReportSupabase(metadata=self.metadata(), resource=config)
            # Unset means Supabase's default of 6 characters.
            length = config.password_min_length or 6
            if length >= min_length:
                report.status = "PASS"
                report.status_extended = (
                    f"Project {config.name} requires passwords of at least "
                    f"{length} characters."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Project {config.name} accepts passwords of {length} characters; "
                    f"at least {min_length} are recommended."
                )
            findings.append(report)
        return findings