Repository navigation
v0.12.0 - Rows
The "Rows" release. In a Supabase app the browser holds the anon key and queries the database directly, so row level security, not your API routes, decides who can read and write a table. CodeDiag now checks it in your migrations.
npx @sabahattink/codediag scan .Highlights
- Tables without RLS are critical. CodeDiag replays
supabase/migrationsin order: renames, schema moves, drops,disable row level security, andrevoke allfrom anon and authenticated. Any table that ends up in an exposed schema without RLS is reported at itscreate tableline. Exposed schemas arepublicby default, or the ones insupabase/config.toml. - Policies open to every row. CodeDiag flags
update,delete, orallpolicies whoseusingistrue, and anoninsertpolicies whosewith checkistrue. Public read policies are left alone. - SQL-aware. Comments, strings, and function bodies never count. A table that is public on purpose can be suppressed with a
-- codediag-ignore-next-linecomment and a reason. - What a clean scan does not mean is now spelled out in the README: object-level authorization, policy conditions, Server Actions, and more.
Checked against vercel/nextjs-subscription-payments, Basejump, and chatgpt-your-files. Suggested by a reader on Indie Hackers. See the changelog.