Works with the AI Agents you already use
supabase rls secrets audit
Audit Supabase RLS policies and scan for leaked secrets with empirical verification probes.
$15
supabase rls secrets audit
Example session with this skill installed
Scan my migrations in supabase/migrations and run a static audit. Then, check if my VITE_ environment variables are leaking the service_role key.
- Read your context and instructions
- Compiled the supabase rls secrets
I have completed the static audit of your migrations and scanned the project for secret leaks.
Security Audit Results
Static RLS Analysis
| Object | Finding | Risk | Status |
|---|---|---|---|
public.profiles | Missing RLS | CRITICAL | DETECTED |
public.orders | Policy USING (true) | HIGH | DETECTED |
public.vault | No SELECT grant for anon | SAFE | VERIFIED |
Secret Scan Summary
| Location | Secret Type | Masked Value | Status |
|---|---|---|---|
.env.local | service_role | eyJhb...fXdc | LEAKED |
src/lib/supabase.ts | anon_key | eyJhb...Q3S4 | INFO (Public) |
dist/assets/index.js | service_role | eyJhb...fXdc | LEAKED |
Proposed Fixes
I have generated a remediation migration at supabase/migrations/20231027_security_patch.sql. This script enables RLS on the profiles table and restricts the orders policy to auth.uid().
Next steps
- Review the proposed SQL migration in
supabase/migrations/20231027_security_patch.sql. - Rotate your
service_rolekey in the Supabase Dashboard immediately, as it was found in a build bundle. - Choose a verification mode (A or B) to run live probes and confirm these fixes block anonymous access.
Connects securely to your tools. The creator never sees your data.
About this skill
Supabase applications often leak sensitive data through misconfigured Row Level Security (RLS) or exposed environment variables. This skill audits your Supabase project to find these vulnerabilities, proposes SQL migrations to fix them, and runs empirical probes to verify the patches work.
What it does
- Static RLS audit scans migration files and SQL scripts for missing policies or overly permissive grants.
- Secret scanning identifies exposed
service_rolekeys or database passwords in code, build artifacts, and environment files. - Live probing tests the Data API as an anonymous user to confirm if data is reachable without authorization.
- Migration generation authors new SQL migration files to repair security holes without editing applied history.
- Verification reporting provides a before-and-after comparison of API responses to prove that fixes actually block unauthorized access.
How it works
- Consent gate requires you to choose a verification mode (local/staging or production URL) and confirm authorization before any network requests occur.
- Discovery and scanning identifies schemas, tables, and potential secret leaks in the local codebase and build directories.
- Baseline probing executes requests against the Supabase API to document current access levels and leaks.
- Remediation and verification generates fix scripts and re-runs probes to confirm the
VERIFIEDstatus of each security improvement.
Frameworks & tools
Built for Supabase environments. Uses Python 3 standard library scripts, Supabase CLI for local stacks, and psql for database catalog audits. Compatible with any frontend framework (React, Next.js, Vue) that uses Supabase client SDKs.
Why this beats prompting it yourself
Generic prompts often suggest fixing RLS by using service_role keys for testing, which bypasses security and gives false negatives. This skill strictly uses anonymous roles for testing and follows a non-negotiable safety contract that prevents accidental data exposure in logs or chat history.
Use cases
- Auditing a project before a production launch to ensure all tables are locked down.
- Rotating leaked service keys and identifying every file where they were exposed.
- Verifying that Row Level Security remains intact after a complex database schema change.
- Generating a security compliance report showing evidence of blocked unauthorized requests.
Known limitations
Does not perform general pentesting or Auth provider configuration. Catalog audits require manual execution if direct database access is not provided. Live write probes in production mode are restricted to prevent data corruption.
Requires Python 3. Does not audit Auth provider settings. Live probes require manual URL/key input. Database catalog audit requires user to run SQL manually.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 21 days ago
Requires