supabase-audit-buckets-public
Identify storage buckets that are publicly accessible and may contain sensitive data.
by yoanbernabeu★ 78 GitHub stars
Install supabase-audit-buckets-public in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
Public Bucket Audit
🔴 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 bucket analyzed- Log to
.sb-pentest-audit.logBEFORE and AFTER each test- DO NOT wait until the skill completes to update files
- If the skill 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 specifically focuses on identifying misconfigured public buckets and exposed sensitive content.
When to Use This Skill
- Quick check for public bucket misconfigurations
- When you suspect sensitive data in public storage
- As a focused security check for storage
- Before deploying to production
Prerequisites
- Supabase URL and anon key available
Why Public Buckets Are Risky
Public buckets allow:
| Access Type | Description |
|---|---|
| Direct URL | Anyone with the URL can download |
| Enumeration | File listing may be possible |
| No Auth | No authentication required |
| Caching | CDN may cache sensitive files |
Common Misconfiguration Scenarios
- Development mistake — Bucket set public during development
- Wrong bucket — Sensitive file uploaded to public bucket
- Legacy — Bucket was public before RLS existed
- Intentional but wrong — Assumed "nobody knows the URL"
Usage
Quick Public Bucket Check
Check for misconfigured public buckets
Deep Scan
Deep scan public buckets for sensitive content
Output Format
═══════════════════════════════════════════════════════════
PUBLIC BUCKET SECURITY AUDIT
═══════════════════════════════════════════════════════════
Project: abc123def.supabase.co
─────────────────────────────────────────────────────────
Public Bucket Discovery
─────────────────────────────────────────────────────────
Public Buckets Found: 3/5
─────────────────────────────────────────────────────────
1. avatars ✅ APPROPRIATE
─────────────────────────────────────────────────────────
Status: Public (Expected)
Purpose: User profile pictures
Content Analysis:
├── All files are images (jpg, png, webp)
├── No sensitive filenames detected
├── File sizes appropriate for avatars (< 1MB)
└── No metadata concerns
Assessment: This bucket appropriately contains only
public user-facing content.
─────────────────────────────────────────────────────────
2. uploads 🟠 P1 - NEEDS REVIEW
─────────────────────────────────────────────────────────
Status: Public (Unexpected for this content)
Purpose: User file uploads
Content Analysis:
├── Mixed file types (PDF, DOC, images)
├── Some sensitive filenames detected
└── Should likely be private with RLS
Sensitive Content Indicators:
├── 12 files with 'invoice' in name
├── 8 files with 'contract' in name
├── 3 files with 'passport' in name
└── 156 PDF files (may contain sensitive data)
Risk Assessment:
└── 🟠 User-uploaded content publicly accessible
Anyone with filename can access any user's files
Recommendation:
```sql
-- Make bucket private
UPDATE storage.buckets
SET public = false
WHERE name = 'uploads';
-- Add user-specific RLS
CREATE POLICY "Users access own uploads"
ON storage.objects FOR ALL
USING (
bucket_id = 'uploads'
AND auth.uid()::text = (storage.foldername(name))[1]
);
───────────────────────────────────────────────────────── 3. backups 🔴 P0 - CRITICAL MISCONFIGURATION ─────────────────────────────────────────────────────────
Status: Public (SHOULD NEVER BE PUBLIC) Purpose: Database backups
⚠️ CRITICAL: Backup files publicly accessible!
Exposed Content: ├── 🔴 db-backup-2025-01-30.sql (125MB) │ └── Full database dump with all user data ├── 🔴 db-backup-2025-01-29.sql (124MB) │ └── Previous day backup ├── 🔴 users-export.csv (2.3MB) │ └── User data export with emails, names ├── 🔴 secrets.env (1KB) │ └── Contains API keys and passwords! └── 🔴 .env.production (1KB) └── Production environment secrets!
Public URLs (Currently Accessible): https://abc123def.supabase.co/storage/v1/object/public/backups/db-backup-2025-01-30.sql https://abc123def.supabase.co/storage/v1/object/public/backups/secrets.env
Impact: ├── Complete database can be downloaded ├── All user PII exposed ├── All API secrets exposed └── Full application compromise possible
═══════════════════════════════════════════════════════════ 🚨 IMMEDIATE ACTION REQUIRED 🚨 ═══════════════════════════════════════════════════════════
MAKE BUCKET PRIVATE NOW:
UPDATE storage.buckets SET public = false WHERE name = 'backups';DELETE PUBLIC FILES: Delete or move all sensitive files from public access
ROTATE ALL EXPOSED SECRETS:
- Stripe API keys
- Database passwords
- JWT secrets
- Any oth
Allowed tools
Tools this skill is permitted to call.
No restriction — this skill can use any tool.
FAQ
What does the supabase-audit-buckets-public skill do?
Identify storage buckets that are publicly accessible and may contain sensitive data.
How do I install the supabase-audit-buckets-public skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the supabase-audit-buckets-public skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
skill-creator
AnthropicCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
discernment-nudge
AnthropicAfter you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
data-consolidate
AnthropicJoins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
inspection-to-capa
AnthropicRuns the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…