Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Supabase RLS Security Audit

    by CashonlyTian

    1

    Ship your Supabase backend with confidence by identifying critical security flaws before they reach production.

    $7

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Supabase RLS Security Audit

    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

    CheckScoreStatusFindings
    RLS Enabled5/15FAIL2 tables missing ENABLE ROW LEVEL SECURITY
    Permissive Policies5/15WARNUSING (true) found on public_posts for anon
    Anon Write Access0/10FAILINSERT allowed for anon on comments table
    Service Role Keys0/15FAILKey detected in frontend bundle
    Security Definer10/10PASSAll functions have search_path set
    Auth Settings5/5PASSEmail 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_role key 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

    Generated

    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 SECURITY statements.
    • 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 .env files for the service_role key and other literal secrets.
    • Auth Configuration Review inspects config.toml for loose settings such as open signup without email confirmation or short password requirements.
    • Function Security ensures SECURITY DEFINER functions have a specific search_path set to prevent search path hijacking.

    How it works

    1. Target Selection: Provide the local directory path containing your Supabase project files.
    2. Local Scan: The skill runs a Python-based scanner that parses SQL, TOML, and JavaScript/TypeScript files without connecting to a live database.
    3. Report Generation: It produces a Markdown report and a visual score-card PNG summarizing the findings.
    4. 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. 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. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 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

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed4 days ago

    What's inside

    Frequently Asked Questions

    This skill audits your local Supabase project files (SQL migrations, config files, and code) to detect missing RLS policies, leaked service keys, and insecure auth settings before they are deployed to production.

    No, the skill performs a local file-based scan of your migrations and configuration, ensuring your database credentials and live data are never exposed to the AI or an external network.

    The skill works with any Supabase project that follows the standard Supabase CLI directory structure, including projects built with Next.js, React, or Vue.

    You will receive the AI agent skill, a structured 10-check scoring system, and templates for generating both Markdown reports and visual security score-cards.

    Because this tool relies on local file analysis, it cannot detect manual changes made directly in the Supabase Dashboard that aren't reflected in your code or migration files.

    New in LLM Ops