supabase-extract-url
Extract the Supabase project URL from client-side JavaScript code, environment variables, and configuration files.
What this skill does
# Supabase URL Extraction
> ๐ด **CRITICAL: PROGRESSIVE FILE UPDATES REQUIRED**
>
> You MUST write to context files **AS YOU GO**, not just at the end.
> - Write to `.sb-pentest-context.json` **IMMEDIATELY after each discovery**
> - Log to `.sb-pentest-audit.log` **BEFORE and AFTER each action**
> - **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 extracts the Supabase project URL from a web application's client-side code.
## When to Use This Skill
- After detecting Supabase usage, to get the exact project URL
- When you need the API base URL for further testing
- To identify which Supabase project an application uses
## Prerequisites
- Target URL accessible
- Supabase usage detected (or suspected)
## How It Works
The skill scans for URL patterns in:
### 1. JavaScript Source Code
```javascript
// Direct URL references
const SUPABASE_URL = 'https://abc123.supabase.co'
createClient('https://abc123.supabase.co', key)
// Environment variable patterns
process.env.SUPABASE_URL
process.env.NEXT_PUBLIC_SUPABASE_URL
import.meta.env.VITE_SUPABASE_URL
```
### 2. HTML Meta Tags and Scripts
```html
<meta name="supabase-url" content="https://abc123.supabase.co">
<script>
window.SUPABASE_URL = 'https://abc123.supabase.co'
</script>
```
### 3. Configuration Objects
```javascript
const config = {
supabase: {
url: 'https://abc123.supabase.co'
}
}
```
## URL Pattern Matching
Recognized patterns:
| Pattern | Example |
|---------|---------|
| Standard | `https://abc123.supabase.co` |
| With region | `https://abc123.eu-central-1.supabase.co` |
| Custom domain | Detected via API endpoint patterns |
## Usage
### Basic Extraction
```
Extract Supabase URL from https://myapp.example.com
```
### From Local Files
If you have downloaded the source:
```
Extract Supabase URL from ./dist/assets/
```
## Output Format
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
SUPABASE URL EXTRACTED
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Project URL: https://abc123def.supabase.co
Project Ref: abc123def
Region: us-east-1 (inferred)
Found in:
โโโ /static/js/main.abc123.js (line 1247)
โ โโโ const SUPABASE_URL = 'https://abc123def.supabase.co'
โ
โโโ /static/js/chunk.def456.js (line 89)
โโโ createClient('https://abc123def.supabase.co', ...)
API Endpoints:
โโโ REST API: https://abc123def.supabase.co/rest/v1/
โโโ Auth API: https://abc123def.supabase.co/auth/v1/
โโโ Storage: https://abc123def.supabase.co/storage/v1/
โโโ Realtime: wss://abc123def.supabase.co/realtime/v1/
Context updated: .sb-pentest-context.json
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## Context Output
Saved to `.sb-pentest-context.json`:
```json
{
"supabase": {
"project_url": "https://abc123def.supabase.co",
"project_ref": "abc123def",
"region": "us-east-1",
"endpoints": {
"rest": "https://abc123def.supabase.co/rest/v1/",
"auth": "https://abc123def.supabase.co/auth/v1/",
"storage": "https://abc123def.supabase.co/storage/v1/",
"realtime": "wss://abc123def.supabase.co/realtime/v1/",
"functions": "https://abc123def.supabase.co/functions/v1/"
},
"sources": [
{
"file": "/static/js/main.abc123.js",
"line": 1247,
"context": "const SUPABASE_URL = 'https://abc123def.supabase.co'"
}
]
}
}
```
## Multiple URLs
If multiple Supabase URLs are found:
```
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
MULTIPLE SUPABASE URLS FOUND
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๏ธ Multiple Supabase projects detected
1. https://abc123.supabase.co (primary - most references)
โโโ Found in: main.js, config.js
2. https://xyz789.supabase.co (secondary)
โโโ Found in: analytics.js
Using primary URL for further analysis.
To use a different URL, specify it manually.
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
```
## Validation
The skill validates extracted URLs by:
1. **Format check** โ Matches expected Supabase URL patterns
2. **Reachability check** โ Attempts to reach the REST API endpoint
3. **Response validation** โ Confirms Supabase-like response
```
Validation:
โโโ Format: โ
Valid Supabase URL format
โโโ Reachable: โ
REST API responds (200 OK)
โโโ Confirmed: โ
Response matches Supabase pattern
```
## Common Issues
โ **Problem:** URL not found despite Supabase detection
โ
**Solution:** The URL may be in a dynamically loaded chunk. Try:
```
Extract URL with deep scan from https://myapp.example.com
```
โ **Problem:** URL found but validation fails
โ
**Solution:** The project may be paused or the region may have connectivity issues. The URL is still recorded.
โ **Problem:** Only custom domain found
โ
**Solution:** Custom domains are valid. The skill will note it as a custom domain and attempt to identify the underlying project.
## Security Notes
- This skill only reads publicly available code
- No authentication is attempted
- The URL alone does not grant access (key is also required)
## Next Steps
After extracting the URL:
1. Run `supabase-extract-anon-key` to find the API key
2. Run `supabase-extract-service-key` to check for leaked service keys
3. Proceed to API auditing skills
## MANDATORY: Progressive Context File Updates
โ ๏ธ **This skill MUST update tracking files PROGRESSIVELY during execution, NOT just at the end.**
### Critical Rule: Write As You Go
**DO NOT** batch all writes at the end. Instead:
1. **Before starting any action** โ Log the action to `.sb-pentest-audit.log`
2. **After each discovery** โ Immediately update `.sb-pentest-context.json`
3. **After each significant step** โ Log completion to `.sb-pentest-audit.log`
This ensures that if the skill is interrupted, crashes, or times out, all findings up to that point are preserved.
### Required Actions (Progressive)
1. **Update `.sb-pentest-context.json`** with extracted data:
```json
{
"supabase": {
"project_url": "https://[ref].supabase.co",
"project_ref": "[ref]",
"endpoints": { ... }
}
}
```
2. **Log to `.sb-pentest-audit.log`**:
```
[TIMESTAMP] [supabase-extract-url] [START] Beginning URL extraction
[TIMESTAMP] [supabase-extract-url] [SUCCESS] URL extracted: https://[ref].supabase.co
[TIMESTAMP] [supabase-extract-url] [CONTEXT_UPDATED] .sb-pentest-context.json updated
```
3. **If files don't exist**, create them before writing.
**FAILURE TO UPDATE CONTEXT FILES IS NOT ACCEPTABLE.**
## MANDATORY: Evidence Collection
๐ **Evidence Directory:** `.sb-pentest-evidence/02-extraction/`
### Evidence Files to Create
| File | Content |
|------|---------|
| `extracted-url.json` | URL extraction details with source locations |
### Evidence Format
```json
{
"evidence_id": "EXT-URL-001",
"timestamp": "2025-01-31T10:05:00Z",
"category": "extraction",
"type": "url_extraction",
"extracted_data": {
"project_url": "https://abc123def.supabase.co",
"project_ref": "abc123def",
"region": "us-east-1"
},
"sources": [
{
"file": "/static/js/main.js",
"line": 1247,
"context": "const SUPABASE_URL = 'https://abc123def.supabase.co'"
}
],
"endpoints_discovered": {
"rest": "https://abc123def.supabase.co/rest/v1/",
"auth": "https://abc123def.supabase.co/auth/v1/",
"storage": "https://abc123def.supabase.co/storage/v1/",
"realtime": "wss://abc123def.supabase.co/realtime/v1/"
}
}
```
## Related Skills
- `supabase-detect` โ Detect Supabase usage first
- `supabase-extract-anon-key` โ Extract the anon key
- `supabase-extract-service-key` โ Check for service key leaks
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.