| ERROR | 0013_rls_disabled_in_public | public.clients | RLS is off; with Supabase default grants the anon key can read and write it | alter table ... enable row level security; then write per-role policies. |
| ERROR | 0013_rls_disabled_in_public | public.invoice_items | RLS is off; with Supabase default grants the anon key can read and write it | alter table ... enable row level security; then write per-role policies. |
| ERROR | 0013_rls_disabled_in_public | public.invoices | RLS is off; with Supabase default grants the anon key can read and write it | alter table ... enable row level security; then write per-role policies. |
| ERROR | 0013_rls_disabled_in_public | public.payments | RLS is off; with Supabase default grants the anon key can read and write it | alter table ... enable row level security; then write per-role policies. |
| WARN | 0024_permissive_rls_policy | public.memberships policy "Allow all for authenticated" (ALL) | USING (true); WITH CHECK (true) | Scope the policy to the caller: (select auth.uid()) = user_id, or a tenant membership check. |
| WARN | 0024_permissive_rls_policy | public.messages policy "Users can post messages" (INSERT) | WITH CHECK (true) | Scope the policy to the caller: (select auth.uid()) = user_id, or a tenant membership check. |
| WARN | 0024_permissive_rls_policy | public.organizations policy "Enable insert for authenticated users only" (INSERT) | WITH CHECK (true) | Scope the policy to the caller: (select auth.uid()) = user_id, or a tenant membership check. |
| WARN | 0024_permissive_rls_policy | public.organizations policy "Enable read access for all users" (SELECT) | USING (true) | Scope the policy to the caller: (select auth.uid()) = user_id, or a tenant membership check. |
| WARN | 0024_permissive_rls_policy | public.organizations policy "Enable update for authenticated users" (UPDATE) | USING (true) | Scope the policy to the caller: (select auth.uid()) = user_id, or a tenant membership check. |
| WARN | 0024_permissive_rls_policy | public.profiles policy "Public profiles are viewable by everyone." (SELECT) | USING (true) | Scope the policy to the caller: (select auth.uid()) = user_id, or a tenant membership check. |
| ERROR | 0015_rls_references_user_metadata | public.messages policy "Users can read messages" | references user_metadata | Authorise from app_metadata (server-set) or a roles table only the service role writes. |
| ERROR | 0015_rls_references_user_metadata | public.projects policy "Admins can manage projects" | references user_metadata | Authorise from app_metadata (server-set) or a roles table only the service role writes. |
| ERROR | 0015_rls_references_user_metadata | public.projects policy "Members or admins can view projects" | references user_metadata | Authorise from app_metadata (server-set) or a roles table only the service role writes. |
| WARN | 0003_auth_rls_initplan | public.messages policy "Users can read messages" | calls auth.* or current_setting() without (select ...) | Wrap the call in a scalar subquery: (select auth.uid()), so Postgres evaluates it once. |
| WARN | 0003_auth_rls_initplan | public.profiles policy "Users can insert their own profile." | calls auth.* or current_setting() without (select ...) | Wrap the call in a scalar subquery: (select auth.uid()), so Postgres evaluates it once. |
| WARN | 0003_auth_rls_initplan | public.profiles policy "Users can update own profile." | calls auth.* or current_setting() without (select ...) | Wrap the call in a scalar subquery: (select auth.uid()), so Postgres evaluates it once. |
| WARN | 0003_auth_rls_initplan | public.projects policy "Admins can manage projects" | calls auth.* or current_setting() without (select ...) | Wrap the call in a scalar subquery: (select auth.uid()), so Postgres evaluates it once. |
| WARN | 0003_auth_rls_initplan | public.projects policy "Members or admins can view projects" | calls auth.* or current_setting() without (select ...) | Wrap the call in a scalar subquery: (select auth.uid()), so Postgres evaluates it once. |
| ERROR | 0010_security_definer_view | public.team_directory | view without security_invoker=true | alter view ... set (security_invoker = true), or replace it with a security-invoker function. |
| ERROR | 0002_auth_users_exposed | public.team_directory | view reads auth.users and is selectable by anon or authenticated | Drop the view; expose only the profile fields you need from a table with RLS. |
| WARN | 0011_function_search_path_mutable | public.get_org_revenue(org uuid) | SECURITY DEFINER with mutable search_path | Add set search_path = '' and schema-qualify every name in the body. |
| WARN | 0011_function_search_path_mutable | public.handle_new_user() | SECURITY DEFINER with mutable search_path | Add set search_path = '' and schema-qualify every name in the body. |
| WARN | 0028_anon_security_definer_function_executable | public.get_org_revenue(org uuid) | anon can call it via /rest/v1/rpc | revoke execute ... from anon, public; or make it security invoker. |
| WARN | 0029_authenticated_security_definer_function_executable | public.get_org_revenue(org uuid) | authenticated can call it via /rest/v1/rpc | Move it to a private schema, check membership inside it, or revoke execute from authenticated. |
| INFO | 0001_unindexed_foreign_keys | public.clients (org_id) | constraint clients_org_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.invoice_items (invoice_id) | constraint invoice_items_invoice_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.invoices (client_id) | constraint invoices_client_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.invoices (org_id) | constraint invoices_org_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.invoices (project_id) | constraint invoices_project_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.memberships (org_id) | constraint memberships_org_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.memberships (user_id) | constraint memberships_user_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.messages (author_id) | constraint messages_author_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.messages (org_id) | constraint messages_org_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.messages (project_id) | constraint messages_project_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.organizations (owner_id) | constraint organizations_owner_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.payments (invoice_id) | constraint payments_invoice_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.projects (client_id) | constraint projects_client_id_fkey | create index on the referencing columns (leading columns of some index). |
| INFO | 0001_unindexed_foreign_keys | public.projects (org_id) | constraint projects_org_id_fkey | create index on the referencing columns (leading columns of some index). |
| WARN | custom_money_float | public.invoice_items.unit_price | double precision | Store integer minor units (cents) or numeric; floats cannot represent 0.10 exactly. |
| WARN | custom_money_float | public.invoices.total | double precision | Store integer minor units (cents) or numeric; floats cannot represent 0.10 exactly. |
| WARN | custom_money_float | public.payments.amount | double precision | Store integer minor units (cents) or numeric; floats cannot represent 0.10 exactly. |
| WARN | custom_money_float | public.projects.budget | double precision | Store integer minor units (cents) or numeric; floats cannot represent 0.10 exactly. |