Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Supabase Role Isolation Gate

    1

    Maps app roles to Supabase RLS policies and creates cross-user and cross-tenant access tests.

    $9.99

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Supabase Role Isolation Gate

    Supabase Role Isolation Gate

    Example session with this skill installed

    Review this fictional Supabase app before launch. Roles: volunteer and coordinator. Volunteers should read only their own assigned records. Coordinators should read records in their own region only. Current schema has profiles(id, role, region_id), assignments(user_id, record_id), records(id, region_id, owner_id). RLS is enabled on records, but the SELECT policy is `USING (true)`. UPDATE policy and RPC functions were not supplied. Identify confirmed risks, unknowns, and the smallest useful negative test set. Do not connect to a live project or run SQL.

    • Read your context and instructions
    • Compiled the supabase role isolation

    ## Result: BLOCK for authenticated SELECT The supplied policy `USING (true)` permits every authenticated row covered by the policy unless another restrictive policy or database boundary changes the result. No such boundary was supplied, so cross-user and cross-region reads must be treated as exposed in this review. | Check | Result | Evidence / next step | |---|---|---| | Volunteer reads own assigned record | UNKNOWN | Assignment join and intended policy were not supplied. Test with two users. | | Volunteer reads another volunteer’s record | BLOCK | Broad SELECT predicate does not restrict rows in the supplied policy. | | Coordinator reads own region | UNKNOWN | Region claim/profile mapping is not shown. Verify trusted source of region_id. | | Coordinator reads another region | BLOCK | No region boundary appears in the supplied SELECT policy. | | UPDATE behavior | UNKNOWN | UPDATE policy and column constraints were not supplied. | | RPC / service-role paths | UNKNOWN | Function definitions and server-side callers are outside this evidence. | ### Safe next steps 1. Replace the broad policy with a reviewed predicate tied to trusted user identity and assignment/region membership. 2. Add tests for unauthenticated access, volunteer A reading volunteer B’s row, coordinator A reading region B, and allowed same-user/same-region reads. 3. Test UPDATE separately with both `USING` and `WITH CHECK`; include attempts to change owner or region fields. 4. Inspect RPCs, views, Storage rules, and service-role code before release. This is a static review of fictional inputs. No database was accessed, no SQL was executed, and the result is not a security certification.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    A practical authorization preflight for multi-role Supabase apps. It traces workflows to database-level rules, flags missing or broad Row Level Security, and produces tests for both allowed and forbidden reads and writes. Remediation SQL is a proposal for review. See it in action: Given a fictional volunteer app where coordinators should see only their own segment, this skill identifies a broad SELECT policy, marks cross-segment access BLOCK, and returns negative tests for a second segment's records.

    This is a scoped review of evidence you supply; it does not certify the entire application. Results depend on the schema, policies, JWT claims, functions, and client/server paths provided. RLS does not automatically cover privileged service-role code, RPC side effects, views, Storage, or external APIs. Static review cannot prove runtime behavior. Provider-specific policy details and test outcomes remain UNKNOWN until verified in an authorized test environment.

    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 25 days ago

    Permissions

    Read Files

    Read-only static analysis of user-supplied evidence. Do not request secrets or connect to production. Redact personal data. Treat remediation SQL as a proposal for human review; run tests only against a non-production project with explicit authorization.

    Listed25 days ago

    What's inside

    Frequently Asked Questions

    No. It reviews only the supplied scope and evidence, identifies risks and missing checks, and proposes tests. It is not a penetration test, formal audit, or security certification.

    No. The skill produces findings, test ideas, and optional remediation proposals for review. It does not connect to Supabase, execute queries, or apply migrations.

    Yes. Static review works from the schema, policy SQL, requirements, and source files you provide. The skill marks missing evidence as UNKNOWN and does not need credentials.

    New in Security