supabase-audit-rpc

Audit Supabase PostgreSQL RPC functions for RLS bypass and injection vulnerabilities.

62|3|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/yoanbernabeu/supabase-pentest-skills --skill supabase-audit-rpc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: supabase-audit-rpc
Source: https://github.com/yoanbernabeu/supabase-pentest-skills/tree/main/skills/audit-api/supabase-audit-rpc
Command: npx skills add https://github.com/yoanbernabeu/supabase-pentest-skills --skill supabase-audit-rpc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps security engineers identify vulnerabilities in Supabase PostgreSQL RPC functions, including potential RLS bypass, insecure definer rights, and unsafe dynamic behavior that could expose data.

Core Features & Use Cases

  • RPC discovery: Enumerate exposed PostgreSQL RPC functions and evaluate their security posture.
  • RLS and auth testing: Verify that RPC calls respect Row Level Security and authenticated access controls.
  • Risk assessment: Detect insecure patterns such as SECURITY DEFINER usage without proper checks or unsafe dynamic queries.
  • Use Case: Run a full RPC audit against a Supabase project to surface critical vulnerabilities and guide remediation.

Quick Start

Run an RPC security audit against your Supabase project by invoking the audit flow on the target project's REST endpoint and reviewing the findings in the generated context and evidence files.

Frequently Asked Questions about supabase-audit-rpc

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I audit Supabase RPC functions for RLS bypass vulnerabilities?

Auditing Supabase RPC functions for RLS bypass involves scanning exposed PostgreSQL functions to verify they respect Row Level Security and authenticated access controls. This process identifies functions where improper definer rights or missing checks allow data exposure.

What is the risk of using SECURITY DEFINER in PostgreSQL RPC functions?

The risk of using SECURITY DEFINER in PostgreSQL RPC functions is that the function executes with the privileges of its owner rather than the caller, potentially bypassing Row Level Security. Auditing checks for missing auth.uid validations and unsafe dynamic queries in these functions.

How do I test if my Supabase RPC functions properly handle input validation and prevent injection?

To test if your Supabase RPC functions handle input validation and prevent injection, an audit evaluates safe parameter usage and detects unsafe dynamic behavior across your exposed functions. This surfaces critical vulnerabilities and guides remediation.

Does this RPC audit check for proper revocation of anonymous access in Supabase?

Yes, this RPC audit checks for proper revocation of anonymous access in Supabase by validating permissions and access control configurations. It ensures exposed PostgreSQL functions enforce authenticated access controls and do not allow unauthorized data retrieval.

How do I discover all exposed PostgreSQL RPC functions in my Supabase project?

To discover all exposed PostgreSQL RPC functions in your Supabase project, you invoke an audit flow on the target project's REST endpoint. The discovery process enumerates all exposed functions and evaluates their security posture.