Works with the AI Agents you already use
Supabase RLS Security Audit
by CashonlyTian
Ship your Supabase backend with confidence by identifying critical security flaws before they reach production.
$7
Supabase RLS Security Audit
Example session with this skill installed
Run a security audit on the Supabase project located at ./my-app-backend. The project name is 'Storefront-API' and use the brand 'Acme Security' for the report.
- Read your context and instructions
- Compiled the supabase rls security
- Generated the document
I have completed the security audit for
Storefront-API. The scan analyzed your migrations, configuration, and client-side code.
Audit Summary:
- Score: 45/100
- Grade: D
- Risk Level: HIGH
- Findings: 12 issues detected (4 Critical, 5 High, 3 Low)
Supabase Security Audit Report
Top 3 Prioritized Fixes
Enable RLS: Tables orders and profiles do not have Row Level Security enabled. This allows bypass of all access controls.
2.
Remove Service Key: Found service_role key in src/lib/supabaseClient.ts. This key bypasses RLS and must never be in client-side code.
3.
Restrict Storage: The avatars bucket is set to public = true with a permissive policy allowing anonymous uploads.
Detailed Findings
| Check | Score | Status | Findings |
|---|---|---|---|
| RLS Enabled | 5/15 | FAIL | 2 tables missing ENABLE ROW LEVEL SECURITY |
| Permissive Policies | 5/15 | WARN | USING (true) found on public_posts for anon |
| Anon Write Access | 0/10 | FAIL | INSERT allowed for anon on comments table |
| Service Role Keys | 0/15 | FAIL | Key detected in frontend bundle |
| Security Definer | 10/10 | PASS | All functions have search_path set |
| Auth Settings | 5/5 | PASS | Email confirmation and JWT expiry are valid |
Files Generated:
- Visual Score Card:
scan-2024-05-20.png - Full Markdown Report:
scan-report.md
Next steps
- Move the
service_rolekey to a secure server-side environment variable. - Execute
ALTER TABLE orders ENABLE ROW LEVEL SECURITY;in your next migration. - Re-run the audit once fixes are applied to verify the new score.
scan-2024-05-20.png
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
Ship your Supabase backend with confidence by identifying critical security flaws before they reach production. This skill audits your SQL migrations, configuration files, and client-side code to detect common misconfigurations that lead to data leaks and unauthorized access. It focuses on the database schema and project files to ensure Row Level Security (RLS) is correctly implemented and secrets are not exposed in frontend bundles.
What it does
- RLS Verification checks every table for active Row Level Security and flags missing
ENABLE ROW LEVEL SECURITYstatements. - Policy Audit detects wide-open policies like
USING (true)for anonymous users and identifies tables with RLS enabled but no policies defined. - Credential Leak Detection scans client-side code and committed
.envfiles for theservice_rolekey and other literal secrets. - Auth Configuration Review inspects
config.tomlfor loose settings such as open signup without email confirmation or short password requirements. - Function Security ensures
SECURITY DEFINERfunctions have a specificsearch_pathset to prevent search path hijacking.
How it works
- Target Selection: Provide the local directory path containing your Supabase project files.
- Local Scan: The skill runs a Python-based scanner that parses SQL, TOML, and JavaScript/TypeScript files without connecting to a live database.
- Report Generation: It produces a Markdown report and a visual score-card PNG summarizing the findings.
- Remediation: Review the prioritized fix list, which ranks issues by severity and point impact on your security score.
Frameworks & tools
Works with Supabase projects using the Supabase CLI structure, including SQL migrations, config.toml, and client frameworks like React, Next.js, or Vue.
Why this beats prompting it yourself
Generic prompts often miss the nuances of Supabase-specific roles like anon vs authenticated. This skill uses a structured 10-check scoring system that ensures consistent coverage across storage buckets, auth settings, and RLS policies that a manual prompt might overlook.
Use cases
- Auditing a Supabase project generated by another AI agent to ensure it follows security best practices.
- Running a pre-deployment check to verify no service keys are leaked in frontend components.
- Onboarding a third-party Supabase repository and quickly assessing its security posture.
- Generating a shareable security score-card for client handovers or project documentation.
Known limitations
Does not connect to live databases, so it cannot verify dashboard-only settings or deployed migrations. It ignores files over 2MB and does not resolve SQL \i include directives.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.
Audits local files only, not live DB settings. Does not resolve SQL include directives. Client detection relies on standard folder names like src or app. Capped at 200 findings.
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 buying a skill.
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 4 days ago
- Software
Python 3Pillow