MCPcopy Create free account
hub / github.com/ShipSecAI/studio / inferProjectRef

Function inferProjectRef

worker/src/components/security/supabase-scanner.ts:21–29  ·  view source on GitHub ↗
(supabaseUrl: string)

Source from the content-addressed store, hash-verified

19
20// Extract Supabase project ref from a standard URL like https://<project-ref>.supabase.co
21function inferProjectRef(supabaseUrl: string): string | null {
22 try {
23 const host = new URL(supabaseUrl).hostname;
24 const m = host.match(/^([a-z0-9]{20})\.supabase\.co$/i);
25 return m ? m[1] : null;
26 } catch {
27 return null;
28 }
29}
30
31const inputSchema = inputs({
32 supabaseUrl: port(

Callers 1

executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected