Commit 3ef3d35
Add Supabase security migration: RLS + view security_invoker
Fixes four Supabase Security Advisor warnings:
1. ALTER VIEW recent_unresolved_errors SET (security_invoker = true)
— prevents view owner's elevated permissions from bypassing RLS
2. Enable RLS on error_log with no public policies
— service_role (cron) bypasses RLS; anon gets no access
3. Enable RLS on monitored_sites + SELECT policy for anon/authenticated
— Lambda functions read via anon key; cron writes via service_role
4. Enable RLS on website_emissions + SELECT policy for anon/authenticated
— Lambda functions read via anon key; cron writes via service_role
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 2457a42 commit 3ef3d35
1 file changed
+50
-0
lines changedLines changed: 50 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
0 commit comments