PostgreSQL & Supabase SQL Security Linter
Catch missing Row Level Security (RLS), permissive USING (true) writes, and dangerous GRANT anon statements before running migrations in production.
Tables detected: invoices
SQL Security Verdict
Score 20/100 (3 Issues)Table "invoices" Created Without Row Level Security (RLS)critical
Add ALTER TABLE public."invoices" ENABLE ROW LEVEL SECURITY; and explicit auth.uid() policies in this same migration.
Excessive Privilege Grant to "anon" or "public" Rolecritical
Revoke blanket write/ALL grants from anon/public and grant least-privilege access only to authenticated roles with RLS.
Column Named "password" Detected (Potential Plaintext Credential Storage)high
Delegate authentication to Supabase Auth / Clerk, or store only strong Argon2/bcrypt hashes in a column explicitly named password_hash.
Auto-Generated RLS Lockdown SQL Patch
-- Auto-generated RLS Lockdown Patch ALTER TABLE public."invoices" ENABLE ROW LEVEL SECURITY; CREATE POLICY "Users manage own invoices rows" ON public."invoices" FOR ALL USING (auth.uid() = user_id) WITH CHECK (auth.uid() = user_id);