feat(rules): Supabase and cloud-functions bodies become path rules, one always-on line each

This commit is contained in:
bchanot committed 2026-10-29 13:03:31 +01:00
1 parent 2fe5291a13
commit 664d1ea839
5 files changed
+36 -13

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
---
paths: ["**/supabase/**", "**/*supabase*.*"]
---
# Supabase — secure by default, domain 4
Path-scoped body of `rules/secure-by-default.md` domain 4 (BDR-125 phase 1);
the always-on line there keeps RLS and the client-side key ban.
- RLS enabled on every table, in the migration that creates it.
- Policies limited to the owner: `(select auth.uid())` per operation, role
`authenticated`. No `using (true)` on writes, no anon write.
- No `service_role` or secret key client-side: not in a bundle, not in a
`NEXT_PUBLIC_`, `VITE_` or `PUBLIC_` variable.
- Views `security_invoker`. `security definer` functions pin `search_path`
and revoke execute from anon. Buckets private by default.