- Home
- Skills
- Data & Databases
- Supabase Auth Security Reviewer
Works with the AI tools you already use
Supabase Auth Security Reviewer
Audit Supabase RLS policies and auth configurations to prevent data leaks with actionable SQL fixes.
Free
Supabase Auth Security Reviewer
Example session with this skill installed
Audit these policies for my 'profiles' and 'orders' tables. RLS is on, but users say they can see other orders.
CREATE POLICY "Public read" ON profiles FOR SELECT USING (true);
CREATE POLICY "Order access" ON orders FOR SELECT USING (true);
- Read your context and instructions
- Compiled the supabase auth security
- Generated the document
I have reviewed your Supabase RLS policies. You have a critical security flaw in your orders table that allows any authenticated or anonymous user to read every order in the database.
Supabase Auth & Security Audit Report
🚨 Critical Security Flaws:
- Insecure Orders Policy: The
orderstable usesUSING (true), which grants global read access to all rows.
Profile Exposure: The profiles table allows public read access to all user profiles, which may leak PII depending on your schema.
📊 RLS Policy Audit:
| Table | Policy Name | Action | Status | Risk Level |
|---|---|---|---|---|
| profiles | Public read | SELECT | Permissive | Medium |
| orders | Order access | SELECT | CRITICAL | High |
| orders | - | INSERT | Missing | Low |
🔑 Auth & JWT Check:
- Your current policies do not reference
auth.uid(), meaning the JWT context is being ignored for row filtering. - Ensure your client-side initialization uses the
anonkey and not theservice_rolekey.
🛠️ Specific Fixes Required:
Enable strict isolation for the orders table:
-- Drop the insecure policy
DROP POLICY "Order access" ON orders;
-- Create a secure policy restricted to the owner
CREATE POLICY "Users can view own orders"
ON orders
FOR SELECT
USING (user_id = auth.uid());
-- Ensure RLS is active (re-run to be safe)
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;
Restrict profile access (optional but recommended):
DROP POLICY "Public read" ON profiles;
CREATE POLICY "Users can view own profile"
ON profiles
FOR SELECT
USING (id = auth.uid());
Next steps
- Run the SQL fixes in your Supabase SQL Editor or include them in your next migration.
- Verify that your
orderstable has auser_idcolumn linked toauth.users. - Test the query from the frontend using a non-admin test account.
[Self-Check]
- RLS explicitly checked and enabled on all relevant tables
- Policies verified for strict user isolation using auth.uid()
- Service role key usage flagged if misused in client
- Exact SQL fixes provided for all identified flaws
supabase-auth-security-reviewer.pdf
PDF · document
Example file from a real run - the skill writes it into your workspace.
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Misconfigured Row Level Security (RLS) is the leading cause of data leaks in Supabase applications. Developers often forget to enable RLS or write overly permissive policies that inadvertently expose private user records to the public internet.
What it does
- Scans database schemas to ensure RLS is explicitly enabled on all tables containing sensitive user data.
- Verifies that
auth.uid()is correctly implemented to enforce strict tenant isolation. - Identifies dangerous
PERMISSIVEpolicies and public write access on sensitive tables like profiles or payments. - Audits Edge Functions and client code for improper Service Role Key exposure.
- Generates precise SQL migration scripts to patch identified security holes immediately.
Frameworks & tools
Supabase, PostgreSQL, Row Level Security (RLS), Supabase Edge Functions, and JWT-based authentication.
Why this beats prompting it yourself
General AI often misses the nuance of PostgreSQL policy evaluation order or the specific syntax of Supabase's auth schema. This skill follows a rigid audit checklist that covers the common "gotchas" like forgotten ALTER TABLE commands and service role misuse, providing copy-paste SQL fixes instead of generic advice.
Use cases
- Reviewing new database migrations before pushing to production.
- Troubleshooting reports that users can see each other's private data.
- Auditing legacy Supabase projects for compliance with security best practices.
- Hardening Edge Functions to prevent privilege escalation.
Known limitations
Requires the user to provide schema definitions or existing RLS policy syntax. Cannot directly access a live database without the user pasting the relevant SQL or configuration.
How to install
Works the same in every agent - Claude, Cursor, Codex, Copilot and 20+ more.
- 1
Download the ZIP
Free skills download straight away. Paid skills unlock right after purchase.
- 2
Unzip into your skills folder
Every agent reads skills from one folder on your machine. Drop the unzipped folder in there.
- 3
Ask your agent to use it
Restart the agent if it was already running. It picks the skill up automatically - no config needed.
Skills folder by agent
Click the path to copy it. Create the folder if it does not exist yet.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill passes our trust checks below.
Security scanned
Passed our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scanned
Verified clean 4 days ago
- Free to download with an account