Database advisor report: after

Source file: evidence/audit/after.md

Source: after/supabase/migrations, loaded into localbase (PGlite, Postgres with Supabase roles and grants). Lints modelled on Supabase splinter. Generated by scripts/audit-db.ts.

LevelCount
ERROR0
WARN0
INFO1
LevelLintObjectDetailRemediation
INFO0008_rls_enabled_no_policypublic.stripe_eventsno policies: denied to anon and authenticatedIntentional for service-role-only tables; otherwise add policies.

Lints run

LintLevelChecks
0013_rls_disabled_in_publicERRORRLS disabled on a table in an API-exposed schema
0007_policy_exists_rls_disabledERRORPolicies exist but RLS is disabled
0024_permissive_rls_policyWARNPolicy expression is always true
0015_rls_references_user_metadataERRORPolicy trusts user_metadata, which every user can edit
0003_auth_rls_initplanWARNauth.<fn>() evaluated per row in a policy
0010_security_definer_viewERRORView runs with its owner's privileges (bypasses RLS)
0002_auth_users_exposedERRORauth.users exposed through a view in an API schema
0011_function_search_path_mutableWARNFunction without a pinned search_path
0028_anon_security_definer_function_executableWARNSECURITY DEFINER function in public callable by anon
0029_authenticated_security_definer_function_executableWARNSECURITY DEFINER function in public callable by any signed-in user
0001_unindexed_foreign_keysINFOForeign key without a covering index
0008_rls_enabled_no_policyINFORLS enabled with no policies (only the service role can use the table)
custom_money_floatWARNMoney stored as floating point