원클릭으로
supabase-pentest
// Orchestrate a complete Supabase security audit with guided step-by-step execution and ownership confirmation.
// Orchestrate a complete Supabase security audit with guided step-by-step execution and ownership confirmation.
Test Row Level Security (RLS) policies for common bypass vulnerabilities and misconfigurations.
List and test exposed PostgreSQL RPC functions for security issues and potential RLS bypass.
List all tables exposed via the Supabase PostgREST API to identify the attack surface.
Attempt to read data from exposed tables to verify actual data exposure and RLS effectiveness.
Analyze Supabase authentication configuration for security weaknesses and misconfigurations.
Test if user signup is open and identify potential abuse vectors in the registration process.
| name | supabase-pentest |
| description | Orchestrate a complete Supabase security audit with guided step-by-step execution and ownership confirmation. |
🔵 RECOMMENDED: USE PLAN MODE FOR COMPLEX AUDITS
When your environment supports Plan Mode, it is strongly recommended to activate it before starting the audit:
- Use the
EnterPlanModetool at the start of the orchestration- Plan Mode enables better organization of multi-phase audits
- It allows the user to validate the approach before execution
- If Plan Mode is not available, proceed directly with execution
Plan Mode provides better traceability and user control over the audit process.
🔴 CRITICAL: PROGRESSIVE FILE UPDATES REQUIRED
You MUST write to context files AS YOU GO, not just at the end.
- Write to
.sb-pentest-context.jsonIMMEDIATELY after each discovery- Log to
.sb-pentest-audit.logBEFORE and AFTER each action- DO NOT wait until a phase or skill completes to update files
- If the audit crashes or is interrupted, all prior findings must already be saved
This is not optional. Failure to write progressively is a critical error.
This skill orchestrates a complete security audit of a Supabase-based application, guiding you through each phase with validation checkpoints.
BEFORE starting any audit, you MUST:
.sb-pentest-context.json if it doesn't exist.sb-pentest-audit.log if it doesn't exist.sb-pentest-evidence/ directory structureDURING execution - WRITE AS YOU GO:
.sb-pentest-audit.log.sb-pentest-context.json.sb-pentest-evidence/All tracking files MUST be systematically maintained throughout the entire audit.
| File | Purpose | Update Frequency |
|---|---|---|
.sb-pentest-context.json | Centralized state and findings | After EVERY discovery |
.sb-pentest-audit.log | Chronological action log | BEFORE and AFTER every action |
.sb-pentest-evidence/timeline.md | Timestamped findings narrative | After EVERY significant finding |
.sb-pentest-evidence/curl-commands.sh | Reproducible test commands | After EVERY curl/HTTP request |
Before moving to the next phase, the orchestrator MUST verify:
.sb-pentest-context.json contains all discoveries from current phase.sb-pentest-audit.log has entries for all actions performed.sb-pentest-evidence/XX-phase-name/timeline.md is updated with any P0/P1/P2 findingscurl-commands.sh contains all HTTP requests madeIf any file is missing or incomplete, DO NOT proceed to the next phase.
Each skill MUST follow this pattern:
1. [LOG] Write START entry to audit.log
2. [CONTEXT] Update context.json with "phase_in_progress"
3. [ACTION] Perform the test/scan
4. [EVIDENCE] Save evidence file IMMEDIATELY
5. [CURL] Append curl command to curl-commands.sh
6. [TIMELINE] Update timeline.md if significant finding
7. [CONTEXT] Update context.json with results
8. [LOG] Write COMPLETE entry to audit.log
If a skill or phase fails:
⚠️ WHY THIS MATTERS:
FAILURE TO UPDATE CONTEXT FILES PROGRESSIVELY IS NOT ACCEPTABLE.
Each individual skill is responsible for updating these files AS IT WORKS, not just at completion. If a skill does not update the context progressively, the orchestrator must do it immediately after each discovery.
⚠️ AUTHORIZATION REQUIRED
Before proceeding, you must confirm:
1. I own this application, OR
2. I have explicit written authorization to perform security testing
Unauthorized security testing may violate laws and terms of service.
Type "I confirm I am authorized to test this application" to proceed.
The orchestrator runs these phases sequentially with confirmation between each.
📁 REMINDER: After EVERY phase, verify that:
.sb-pentest-context.jsonis updated with phase results.sb-pentest-audit.loghas START and COMPLETE entries- Evidence files are saved to
.sb-pentest-evidence/XX-phase/timeline.mdreflects any significant findingscurl-commands.shcontains all HTTP requests made
Sets up the audit environment and evidence collection.
Pre-Phase Action (if supported):
EnterPlanMode if the environment supports itActions:
.sb-pentest-context.json.sb-pentest-audit.log.sb-pentest-evidence/ directory structurecurl-commands.sh with headertimeline.md with audit start.sb-pentest-audit.logSkills invoked:
supabase-evidence (initialization)Verification before proceeding:
Output: Ready to collect evidence with full directory structure
Determines if the target uses Supabase and extracts basic information.
Skills invoked:
supabase-detectOutput: Confirmation of Supabase usage, project URL identified
Evidence saved to: .sb-pentest-evidence/01-detection/
Scans client-side code for exposed credentials.
Skills invoked:
supabase-extract-urlsupabase-extract-anon-keysupabase-extract-service-keysupabase-extract-jwtsupabase-extract-db-stringOutput: List of all discovered credentials with severity assessment
Evidence saved to: .sb-pentest-evidence/02-extraction/
Tests PostgREST API exposure and RLS policies.
Skills invoked:
supabase-audit-tables-listsupabase-audit-tables-readsupabase-audit-rlssupabase-audit-rpcOutput: Tables accessible, data exposure assessment, RLS gaps
Evidence saved to: .sb-pentest-evidence/03-api-audit/
Checks storage bucket configurations and access.
Skills invoked:
supabase-audit-buckets-listsupabase-audit-buckets-readsupabase-audit-buckets-publicOutput: Bucket inventory, public exposure, accessible files
Evidence saved to: .sb-pentest-evidence/04-storage-audit/
Analyzes authentication configuration and potential weaknesses.
Skills invoked:
supabase-audit-auth-configsupabase-audit-auth-signupsupabase-audit-auth-userssupabase-audit-authenticated ← NEW: Creates test user (with consent) to detect IDOROutput: Auth provider analysis, signup restrictions, enumeration risks, authenticated vs anonymous comparison
Evidence saved to: .sb-pentest-evidence/05-auth-audit/
⚠️ Note:
supabase-audit-authenticatedwill ask for explicit consent before creating a test user. This is optional but highly recommended to detect IDOR and cross-user access vulnerabilities.
Tests WebSocket channels and Edge Functions.
Skills invoked:
supabase-audit-realtimesupabase-audit-functionsOutput: Exposed channels, function endpoints, access control issues
Evidence saved to: .sb-pentest-evidence/06-realtime-audit/ and .sb-pentest-evidence/07-functions-audit/
Compiles all findings into a comprehensive report.
Skills invoked:
supabase-reportOutput: Full Markdown report with executive summary, findings, and remediation
When Plan Mode is supported, the recommended workflow is:
1. User requests audit → Agent uses EnterPlanMode
2. Agent explores target superficially (detect Supabase, extract URL)
3. Agent writes plan to plan file with:
- Target URL
- Detected Supabase configuration
- Proposed phases to execute
- Estimated scope
4. Agent uses ExitPlanMode → User reviews and approves
5. Agent executes phases with systematic file updates
6. After each phase → Agent confirms files are updated
7. Final report generation
Benefits of Plan Mode:
Run a Supabase security audit on https://myapp.example.com
The agent SHOULD:
EnterPlanMode if availableRun a Supabase security audit on https://myapp.example.com --no-plan
Continue Supabase audit from Phase 3 (API Audit)
Run Supabase audit on https://myapp.example.com, skip auth audit
⚠️ CRITICAL: Updating tracking files and collecting evidence is MANDATORY.
The orchestrator creates and manages:
| File/Directory | Purpose |
|---|---|
.sb-pentest-context.json | Stores extracted data between phases |
.sb-pentest-audit.log | Logs all actions with timestamps |
.sb-pentest-evidence/ | Evidence directory for professional audits |
The orchestrator initializes the evidence directory at the start of every audit:
.sb-pentest-evidence/
├── README.md # Evidence index
├── curl-commands.sh # All reproducible curl commands
├── timeline.md # Chronological findings
├── 01-detection/ # Detection evidence
├── 02-extraction/ # Key extraction evidence
├── 03-api-audit/ # API audit evidence
│ ├── tables/
│ ├── data-samples/
│ ├── rls-tests/
│ └── rpc-tests/
├── 04-storage-audit/ # Storage audit evidence
│ ├── buckets/
│ └── public-url-tests/
├── 05-auth-audit/ # Auth audit evidence
│ ├── signup-tests/
│ └── enumeration-tests/
├── 06-realtime-audit/ # Realtime audit evidence
├── 07-functions-audit/ # Functions audit evidence
└── screenshots/ # Optional screenshots
Each skill MUST save evidence to its respective directory as it works.
.sb-pentest-context.json MUST be updated with results.sb-pentest-audit.log with timestampEach entry in .sb-pentest-audit.log must follow this format:
[YYYY-MM-DD HH:MM:SS] [SKILL_NAME] [STATUS] Message
Example:
[2025-01-31 14:00:00] [supabase-detect] [START] Starting Supabase detection
[2025-01-31 14:00:05] [supabase-detect] [SUCCESS] Supabase detected
[2025-01-31 14:00:05] [supabase-detect] [CONTEXT_UPDATED] .sb-pentest-context.json updated
{
"target_url": "https://myapp.example.com",
"started_at": "2025-01-31T10:00:00Z",
"authorization_confirmed": true,
"supabase": {
"detected": true,
"project_url": "https://abc123.supabase.co",
"anon_key": "eyJ...",
"service_key_exposed": false
},
"phases_completed": ["detection", "extraction"],
"findings": []
}
The orchestrator implements adaptive rate limiting:
After each phase:
═══════════════════════════════════════════════════════════
PHASE 2 COMPLETE: Key Extraction
═══════════════════════════════════════════════════════════
Findings:
├── ✅ Anon key found (expected)
├── ❌ P0: Service role key EXPOSED in main.js:1247
└── ⚠️ P1: JWT secret pattern detected
Proceed to Phase 3 (API Audit)? [Y/n]
═══════════════════════════════════════════════════════════
❌ Problem: Audit stops at Phase 1 with "Supabase not detected" ✅ Solution: The app may use a custom domain. Manually provide the Supabase URL:
Run audit with Supabase URL https://myproject.supabase.co
❌ Problem: Rate limited during audit ✅ Solution: The orchestrator auto-adjusts. If persistent, wait 5 minutes and resume.
❌ Problem: Context file corrupted
✅ Solution: Delete .sb-pentest-context.json and restart the audit.
supabase-help — Quick reference for all skillssupabase-evidence — Evidence collection managementsupabase-report — Generate report from existing contextsupabase-report-compare — Compare with previous audits