More screenshots
Works with the AI Agents you already use
What Your Repo Hides
This pack does not review your code.
$12
What Your Repo Hides
Example session with this skill installed
Audit my live Supabase project for row level security leaks and fix them with versioned migrations.
- Read your context and instructions
- Compiled the what your repo
Step 0 (read-only) found 3 issues in your live project:
profileshas a columnemailand a policySELECT ... USING (true)— every authenticated user can read every profile's email.agent_taskshas a policyFOR ALL USING (true) WITH CHECK (true). It is unreachable today only because no GRANT exposes it — one GRANT and the whole table is open.public.sync_profile_email()is SECURITY DEFINER without a pinnedsearch_path, and the project's default privileges give the anonymous rolearwdDxtmon every new table.
The two-role suite confirms it: user B currently sees 4 rows that belong to user A.
Here are the four migrations that close it, in order, with the rollback script.
Connects securely to your tools. The creator never sees your data.
About this skill
Your repo says your RLS is fine. Your live project says otherwise.
This pack does not review your code. It inspects your live project and shows you what is actually open — even when the repo claims it is closed.
The three ways a migration file lies
REVOKE … FROM anondoes not close a function. Postgres grantsEXECUTEtoPUBLICon every new function by default, andanonis a member ofPUBLIC. Revoking fromanonleaves the PUBLIC grant standing, so the function keeps answering. The fix isREVOKE … FROM PUBLIC, anon. (PostgreSQL docs: "by default, execute privilege is granted to PUBLIC for newly created functions… you must revoke the default PUBLIC privileges".)- Default privileges set by hand in the dashboard live in no migration. Your history looks
clean while every table created tomorrow is born with the anonymous role holding
arwdDxtm— insert, select, update, delete, truncate, references, trigger. AndTRUNCATE,REFERENCESandTRIGGERdo not pass through RLS at all. - The owner bypasses RLS. The dashboard's table editor runs as the owner, so it shows you
every row of a correctly locked table — and a policy with
using (true)passes that test too.force row level securitybinds the owner; a superuser or a role withBYPASSRLSstill walks past it, which is why the only honest check is switching role.
Only a photo of the live state settles it. That is step zero, and it is read-only.
What you get
- A read-only inventory (11 queries) returning the real state: tables without RLS, policies
with
using (true), effective grants for the anonymous / authenticated / public roles, views withoutsecurity_invoker,SECURITY DEFINERfunctions without a pinnedsearch_path, and where your identity column lives today. Saved as your baseline for rollback. - Four locks, closed in order. Identity anchored to
auth.users.id(never email, neveruser_metadata);enable+forceRLS with nousing (true)and awith checkonupdate; the second lock (grants, sequences,EXECUTErevoked from the public role,alter default privilegesso future tables arrive closed); and views withsecurity_invoker = true. - A two-role test suite that fails when it should. One transaction,
ROLLBACK, two simulated identities (set local role authenticated+set_config('request.jwt.claims', …)) and the negative assertions that actually matter: B cannot see A's rows (not even by direct id), cannot insert with A'sowner_id, cannot update or delete A's rows, cannot reassignowner_idon its own row, and cannot touch somebody else's folder. An end-to-end variant runs the same checks through the public API with each test user's token. - A diagnosis table of 15 symptoms → cause → action, in the order to check them, so you stop chasing the wrong error.
- A demo bench (schema + two seeded users) to watch the failure and the fix before touching the real project.
- A minimum-surface alternative: revoke everything, put the authorization in one edge
function with
service_role, and keep the rules in code you can unit-test.
What this does not do
- It does not explain RLS. It closes it.
- It does not cover Realtime, RLS on
storage.objects, or server-levelpg_hba/roles. - The SQL was reviewed against the PostgreSQL grammar on 2026-11-10 and has not been run against a live instance by the author. Step 0 and the test suite are read-only: run them first and keep the baseline output as your rollback reference.
- Applying
REVOKE/GRANTchanges what the public API may do. If something depended on a permission you removed, it breaks immediately and visibly — not silently. Apply in staging with the suite green, and have the rollback written before you start.
Does not cover Realtime, RLS on storage.objects, or server-level pg_hba/roles policy. Does not cover logical replication or row-level security on foreign tables. The SQL was reviewed against the PostgreSQL grammar on 2026-11-10 and has not been executed against a live instance by the author — the read-only inventory and the test suite are the intended first steps. Applying REVOKE/GRANT changes what the public API may do; test in staging with the suite green, and keep the rollback script written before you start.
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 6 days ago
Requires
Permissions
File Scopes
The SQL runs in your own database through your own SQL Editor or client; the pack never connects to anything on its own and makes no network calls. The optional Python script reads two environment variables you set (your project URL and your anon key) and talks to your own Supabase public API, read-only, to run the negative checks as two real users.