Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    supabase rls secrets audit

    1

    Audit Supabase RLS policies and scan for leaked secrets with empirical verification probes.

    $15

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    supabase rls secrets audit

    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

    ObjectFindingRiskStatus
    public.profilesMissing RLSCRITICALDETECTED
    public.ordersPolicy USING (true)HIGHDETECTED
    public.vaultNo SELECT grant for anonSAFEVERIFIED

    Secret Scan Summary

    LocationSecret TypeMasked ValueStatus
    .env.localservice_roleeyJhb...fXdcLEAKED
    src/lib/supabase.tsanon_keyeyJhb...Q3S4INFO (Public)
    dist/assets/index.jsservice_roleeyJhb...fXdcLEAKED

    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

    1. Review the proposed SQL migration in supabase/migrations/20231027_security_patch.sql.
    2. Rotate your service_role key in the Supabase Dashboard immediately, as it was found in a build bundle.
    3. 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_role keys 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

    1. Consent gate requires you to choose a verification mode (local/staging or production URL) and confirm authorization before any network requests occur.
    2. Discovery and scanning identifies schemas, tables, and potential secret leaks in the local codebase and build directories.
    3. Baseline probing executes requests against the Supabase API to document current access levels and leaks.
    4. Remediation and verification generates fix scripts and re-runs probes to confirm the VERIFIED status 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. 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 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

    Node.js
    Git

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Network Access
    Environment Variables
    Listed21 days ago

    What's inside

    Frequently Asked Questions

    The skill audits your Supabase project for Row Level Security (RLS) misconfigurations and leaked service keys, then generates SQL migrations to patch these vulnerabilities and runs empirical probes to verify the fixes.

    The skill performs static scans of local code and migrations, but live probing requires either your Supabase project URL for remote testing or the Supabase CLI for local stack verification.

    Yes, it is compatible with any frontend using Supabase (Next.js, React, Vue, etc.) and integrates with the Supabase CLI to audit local migration files and environment configurations.

    Unlike generic AI prompts, this skill uses a specialized safety contract that strictly utilizes anonymous roles for testing, ensuring you don't receive false negatives by accidentally bypassing RLS with high-privilege keys.

    For safety, the skill operates in a non-destructive manner; it generates new SQL migration files to fix holes and restricts write-probes in production environments to prevent data corruption.

    You receive the full audit logic, the secret scanning engine, the migration generator, and the verification reporting module, all designed to produce a 'Verified' security status for your project.

    New in LLM Ops