supabase-extract-db-string

Detect exposed PostgreSQL database connection strings in client-side code.

Updated Aug 28, 2026
One-click install
npx skills add https://github.com/Yash-Awasthi/adapfit --skill supabase-extract-db-string-yash-awasthi
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: supabase-extract-db-string
Source: https://github.com/Yash-Awasthi/adapfit/tree/main/.agents/skills/supabase-extract-db-string
Command: npx skills add https://github.com/Yash-Awasthi/adapfit --skill supabase-extract-db-string-yash-awasthi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Client-side JavaScript bundles sometimes leak PostgreSQL connection strings containing database passwords, allowing attackers to bypass Supabase Row Level Security and access the database directly. This Skill scans deployed applications for these exposed credentials and classifies the finding as a P0 critical issue. ## Core Features & Use Cases - Connection String Detection: Scans JavaScript bundles for full PostgreSQL URLs, Supabase pooler (Supavisor) strings, and partial credential exposure such as separate host and password values. - Environment Variable Leak Checks: Identifies dangerous patterns like DATABASE_URL, POSTGRES_URL, or NEXT_PUBLIC_-prefixed secrets bundled into client code. - Structured Evidence & Remediation: Writes findings progressively to .sb-pentest-context.json, logs actions to .sb-pentest-audit.log, and stores redacted evidence in .sb-pentest-evidence/ with step-by-step password rotation guidance. - Use Case: During a pre-production security audit of a Supabase-backed web app, run this Skill to confirm no direct database credentials ship in the client bundle before launch. ## Quick Start Check for database connection strings on https://myapp.example.com.

Frequently Asked Questions about supabase-extract-db-string

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

FAQPage Schema
How do I check if my Supabase database password is exposed in client code?▼

Scan your deployed JavaScript bundles for postgresql:// connection string patterns, DATABASE_URL references, and Supabase pooler URLs. This Skill automates that scan and reports any match as a P0 critical finding with the exact file and line number.

What should I do if a PostgreSQL connection string is found in my frontend bundle?▼

Immediately reset the database password in the Supabase Dashboard, remove the connection string from source code, verify it is not in NEXT_PUBLIC_ or VITE_ prefixed env vars, and redeploy. Then audit Supabase logs for unauthorized direct connections.

Why is an exposed Supabase database connection string a critical issue?▼

A leaked connection string lets anyone connect directly to PostgreSQL, bypassing all Row Level Security policies. Attackers gain full read/write access to every table, including auth.users, and can modify the database schema.

Can partial database credentials still be a security risk?▼

Yes. A database host and password exposed in separate locations can potentially be combined to gain access. The Skill flags partial exposure as a P1 finding and recommends rotating the password as a precaution.

What is the correct architecture instead of direct database access from the client?▼

Clients should only use the Supabase client library over the REST API. Direct PostgreSQL access belongs in server-side code, Supabase Edge Functions, or migration tools where credentials stay off the client bundle.