Lovable App Security & Supabase Scanner
Built an app in Lovable with Supabase? Run a 10-second passive audit on your live URL to verify your anon key vs. service_role boundary, PostgREST RLS signals, source maps, and production headers.
01 · Exact Passive Checks
What LeakRay inspects on your live URL
| Rule ID & Check | What It Inspects | Why It's Passive & Safe |
|---|---|---|
supabase-context-checkSupabase Anon vs. Service Role & PostgREST Schema | Decodes Supabase JWTs embedded in Lovable's Vite bundles to confirm only an anon key ships to browsers, and checks public PostgREST OpenAPI metadata for exposed sensitive tables. | Read-only GET inspection only—never writes rows, alters RLS policies, or reads private user data. |
secret-private-keysLeaked OpenAI, Stripe & Service Role Keys in Vite Bundles | Scans compiled JavaScript chunks for private keys accidentally added as VITE_* variables or hardcoded inside Lovable frontend components. | Public Supabase anon keys and Stripe pk_live_ keys stay noise-free; true private secrets are redacted before storage. |
exposed-sourcemapsPublic Vite Production Source Maps | Verifies whether compiled Lovable/Vite bundles expose public .js.map files containing your original TypeScript source and comments. | Inspects only sourceMappingURL directives referenced by already-public scripts. |
security-headers-coreCustom Domain CSP, HSTS & Clickjacking Headers | Audits HTTP security headers (HSTS, CSP, X-Content-Type-Options, frame protection, Referrer-Policy) on your live Lovable or custom Cloudflare/Vercel domain. | Reads standard HTTP response headers from a single passive GET request. |
exposed-env-fileExposed .env Files on Custom Deployments | Checks whether self-hosted or exported Lovable builds accidentally serve /.env files containing database or third-party API secrets. | Single bounded GET request under 2 MB with soft-404 filtering. |
02 · Vulnerable vs. Fixed
Common production leak pattern and the exact fix
// Vulnerable: Lovable Vite client calling OpenAI directly + table without RLS
// src/lib/ai.ts
const res = await fetch("https://api.openai.com/v1/responses", {
method: "POST",
headers: {
// CRITICAL: Any VITE_* env var is compiled into public browser JS
Authorization: `Bearer ${import.meta.env.VITE_OPENAI_API_KEY}`,
},
body: JSON.stringify({ model: "gpt-4.1-mini", input: prompt }),
});
-- Missing RLS in Supabase migration:
create table public.orders (id uuid primary key, user_id uuid, total_cents int);// Fixed: Invoke a Supabase Edge Function (secret stays in Supabase Vault/Secrets)
// src/lib/ai.ts
const { data, error } = await supabase.functions.invoke("generate-summary", {
body: { prompt },
});
-- Supabase migration with strict Row Level Security:
alter table public.orders enable row level security;
create policy "Users view own orders"
on public.orders for select
using (auth.uid() = user_id);03 · AI Fix Prompt
Paste into Cursor, Claude Code, Lovable, or Bolt
Run a pre-launch security audit on this Lovable + Supabase app:
1. Confirm only `VITE_SUPABASE_URL` and `VITE_SUPABASE_ANON_KEY` are used in `src/` client code—move any `service_role`, OpenAI, Anthropic, Resend, or Stripe secret calls into authenticated Supabase Edge Functions using server-side secrets.
2. Inspect every SQL migration and table in the `public` schema to ensure `ALTER TABLE ... ENABLE ROW LEVEL SECURITY;` and least-privilege `auth.uid()` policies are active.
3. Verify `vite.config.ts` does not publish public production source maps (`build.sourcemap: false` or `"hidden"`).
4. Add baseline security headers (CSP, HSTS, X-Content-Type-Options, Referrer-Policy, Permissions-Policy) at my hosting/CDN layer.04 · Developer FAQ
Frequently asked questions
- Why does LeakRay say my Lovable app's Supabase anon key is safe?
- Supabase anon keys are intentionally public so browser apps can talk to PostgREST and Auth. Real security in a Lovable app comes from keeping service_role keys strictly in Supabase Edge Functions and enforcing Row Level Security (RLS) on every public table.
- How should I call OpenAI, Anthropic, or Stripe from a Lovable frontend?
- Never store private API keys in VITE_* variables. Instead, create a Supabase Edge Function, store the secret via Supabase Edge Function Secrets, verify the caller's JWT, and call the Edge Function via supabase.functions.invoke().
- Can I scan both a .lovable.app preview URL and my custom production domain?
- Yes. Paste either URL into LeakRay to run all 22 passive checks in under 15 seconds. Scanning your custom domain also verifies your Cloudflare/Vercel DNS, HSTS, and response header configuration.
- Will LeakRay modify my Supabase database or trigger Lovable usage spikes?
- No. LeakRay performs strictly passive, read-only GET/HEAD checks capped at a small number of requests and a 15-second total budget, never mutating database tables or replaying discovered tokens.
More Passive Scanners
Explore related LeakRay checks
Supabase RLS & Key Exposure Checker
Passively scan your live app for leaked Supabase service_role keys, exposed PostgREST schemas, and missing RLS signals. Zero signup, <15s.
Open scanner Next.js · App Router & Pages Router · Passive AuditNext.js Production Security Scanner
Audit live Next.js apps for __NEXT_DATA__ secret leaks, debug stack traces, exposed source maps, .env files, and missing security headers.
Open scanner JS Bundles · Entropy + Context Validation · Passive AuditLeaked API Key & Frontend Secret Scanner
Scan your live HTML and JavaScript bundles for leaked Stripe, OpenAI, Anthropic, Gemini, AWS, and GitHub keys—without false-positive noise.
Open scanner Server Config · Dotfiles · Passive AuditExposed .env & .git File Checker
Check if your live website publicly exposes /.env, /.git/HEAD, or backup config files. Passive read-only URL scan with instant fixes. Zero signup.
Open scanner Firebase · Firestore · Passive AuditFirebase & Firestore Security Scanner
Passively audit live Firebase apps for leaked Admin SDK keys, exposed .env files, public source maps, and weak security headers without public apiKey noise.
Open scanner Cursor · Lovable · Bolt · v0 · Passive AuditSecurity Scanner for Vibe-Coded Apps
Free pre-launch security check for AI-built apps from Cursor, Claude Code, Lovable, Bolt, and v0. Catch leaked keys, open files, and missing headers.
Open scanner JavaScript Bundles · .js.map · Passive AuditProduction Source Map Exposure Checker
Check if your live Next.js, Vite, or React app publicly exposes .js.map source maps. Passive URL scan with framework-specific fixes and AI prompts.
Open scanner Headers · CORS · Cookies · Passive AuditHTTP Security Headers & CORS Checker
Check HSTS, CSP, SRI, COOP, CORS credential reflection, and cookie flags — plus JS secret & file checks that header-only scanners miss. Zero signup.
Open scanner Git Metadata · /.git/HEAD · Passive AuditExposed .git Directory & Config Checker
Check if your live site publicly serves /.git/HEAD or /.git/config before attackers dump source code and commit history. Passive URL scan, zero signup.
Open scanner CORS · Origin Reflection · Passive AuditCORS Misconfiguration & Reflection Checker
Test your live app for dangerous CORS origin reflection paired with Access-Control-Allow-Credentials: true. Passive read-only check with instant code fixes.
Open scanner GraphQL · __schema · Passive AuditGraphQL Introspection Exposure Checker
Verify whether /graphql or /api/graphql exposes your full __schema to unauthenticated callers in production. Read-only passive scan with Apollo & Yoga fixes.
Open scanner Set-Cookie · HttpOnly · Secure · SameSiteCookie Security Flags Checker
Audit Set-Cookie headers on your live app for missing HttpOnly, Secure, and SameSite flags on session and auth cookies. Zero signup, passive URL scan.
Open scanner Bolt.new · Vite · Client Bundles · Passive AuditBolt.new Security & Vite Bundle Scanner
Scan live Bolt.new and Vite apps for VITE_* client bundle leaks, exposed .env files, public .js.map source maps, and BaaS key misconfigurations in <15s.
Open scanner Cursor · Vercel v0 · Next.js · Passive AuditCursor & v0 Next.js Security Scanner
Audit live Next.js apps built with Cursor and Vercel v0 for __NEXT_DATA__ leaks, NEXT_PUBLIC_* secrets, debug routes, source maps, and missing headers.
Open scanner