Back to Checks
Supabase Edge Function verifies the caller's JWT
functions_jwt_verification_enabled
Service: functionsSeverity: medium
OfficialVerifiedPrivate
Categories:internet-exposedidentity-access
Resource Type:SupabaseEdgeFunction
Checks that Edge Functions have JWT verification enabled, so the platform rejects requests without a valid Supabase JWT before the function runs.
Risk
A function without JWT verification runs for any caller on the internet. Unless it authenticates requests itself, anyone can invoke it and reach the data or services it uses.
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 functions_jwt_verification_enabledRecommendation
Enable JWT verification, or authenticate requests inside the function (for example webhook signatures) and mute this finding.
Remediation
CLI
supabase functions deploy <function-name> --project-ref <project-ref>Other
1Remove --no-verify-jwt from the deploy command, or set verify_jwt = true for the function in supabase/config.toml
2Redeploy the function
Check Code
from prowler.lib.check.models import Check
from prowler_provider_supabase.check_report import CheckReportSupabase
from prowler_provider_supabase.services.functions.functions_client import (
functions_client,
)
class functions_jwt_verification_enabled(Check):
def execute(self) -> list[CheckReportSupabase]:
findings = []
for function in functions_client.functions:
report = CheckReportSupabase(metadata=self.metadata(), resource=function)
if function.verify_jwt:
report.status = "PASS"
report.status_extended = (
f"Edge Function {function.name} in project {function.project_name} "
"verifies the caller's JWT."
)
else:
report.status = "FAIL"
report.status_extended = (
f"Edge Function {function.name} in project {function.project_name} "
"does not verify the caller's JWT."
)
findings.append(report)
return findings