LeakRay
Bolt.new · Vite · Client Bundles · Passive Audit

Bolt.new Security & Vite Bundle Scanner

Shipped a Vite/React app from Bolt.new to Netlify, Cloudflare, or a VPS? Audit your live URL for VITE_* secret leaks, exposed .env files, public source maps, and open Supabase or Firebase configs.

01 · Exact Passive Checks

What LeakRay inspects on your live URL

Read /bot passive safety guarantees →
Rule ID & CheckWhat It InspectsWhy It's Passive & Safe
secret-private-keys
VITE_* Private API Key Leaks in Client Bundles
Scans initial HTML and up to 10 first-party Vite JS chunks for Stripe, OpenAI, Anthropic, Gemini, AWS, GitHub, and private PEM keys accidentally prefixed with VITE_.Ignores public client keys (Stripe pk_live_, Supabase anon, Firebase web apiKey) and redacts any real leaked key before storage.
exposed-env-file
Public /.env File Exposure
Checks whether exported Bolt.new projects deployed to static hosts or VPS servers accidentally serve /.env containing server secrets.Single bounded GET request under 2 MB with SPA soft-404 filtering.
exposed-sourcemaps
Public Vite .js.map Source Maps
Detects Vite builds deployed with build.sourcemap: true that expose original TypeScript/JSX source files over HTTP.Follows only sourceMappingURL headers/comments declared by your own JS bundles.
supabase-context-check
Supabase Key Role & PostgREST Context
Verifies that Bolt.new Supabase templates ship only an anon key to the browser and checks public PostgREST schema signals.Passive read-only GET inspection only.
firebase-misconfig-check
Firebase Realtime Database Public Read Check
Detects Firebase Realtime Database URLs embedded in Vite bundles that allow unauthenticated public reads at /.json.Read-only shallow check with strict response caps—never writes or mutates database entries.

02 · Vulnerable vs. Fixed

Common production leak pattern and the exact fix

Vulnerable
ts
// Vulnerable: Bolt.new Vite app bundling private keys + public source maps
// vite.config.ts
export default defineConfig({
  build: { sourcemap: true }, // Ships readable .js.map files publicly
});

// src/lib/payments.ts
const stripeSecret = import.meta.env.VITE_STRIPE_SECRET_KEY; // CRITICAL LEAK
Fixed
ts
// Fixed: Disable public source maps & proxy private API calls on the server
// vite.config.ts
export default defineConfig({
  build: { sourcemap: "hidden" }, // Keep maps private for error trackers only
});

// src/lib/payments.ts (browser calls your Netlify Function / Worker / API route)
export async function createCheckoutSession(priceId: string) {
  const res = await fetch("/api/checkout", {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ priceId }),
  });
  return res.json();
}

03 · AI Fix Prompt

Paste into Cursor, Claude Code, Lovable, or Bolt

Audit this Bolt.new / Vite project for production security leaks:
1. Search all files for `import.meta.env.VITE_` and move any secret key (OpenAI, Anthropic, Stripe `sk_live_`, Supabase `service_role`, database URLs) into a serverless endpoint (Netlify Function, Cloudflare Worker, Vercel Function, or Supabase Edge Function) using non-VITE env vars.
2. Update `vite.config.ts` so `build.sourcemap` is `false` or `"hidden"` in production.
3. Verify `.env` is in `.gitignore` and never copied into `public/` or `dist/`.
4. Add a `public/_headers` (Netlify/Cloudflare Pages) or hosting header config setting HSTS, CSP, `X-Content-Type-Options: nosniff`, `Referrer-Policy`, and `Permissions-Policy`.

04 · Developer FAQ

Frequently asked questions

Why do secrets prefixed with VITE_ in Bolt.new end up visible to every user?
Vite statically replaces every import.meta.env.VITE_* reference at build time by inlining the raw string directly into your compiled JavaScript bundle. Anyone opening DevTools or viewing your JS assets can extract those keys in seconds.
Which environment variables are actually safe to put in VITE_*?
Only intentionally public identifiers such as VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY, VITE_STRIPE_PUBLISHABLE_KEY (pk_live_), Firebase web config, and public analytics IDs. Any secret that bills your account or bypasses RLS must stay server-side.
How do I add security headers to a Bolt.new app deployed on Netlify or Cloudflare Pages?
Add a public/_headers file with /* rules for Strict-Transport-Security, Content-Security-Policy, X-Content-Type-Options: nosniff, Referrer-Policy, and Permissions-Policy, then re-scan your live URL with LeakRay to verify.
Can I check my Bolt.new project locally before deploying?
Yes. Run npx leakray http://localhost:5173 --allow-local against your local Vite preview server (npm run build && npm run preview) to run all 22 passive checks before shipping.

More Passive Scanners

Supabase · PostgREST · Passive Audit

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 Audit

Next.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 Audit

Leaked 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 Audit

Exposed .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 Audit

Firebase & 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 Audit

Security 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 Audit

Production 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 Audit

HTTP 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 Audit

Exposed .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 Audit

CORS 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 Audit

GraphQL 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 · SameSite

Cookie 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
Lovable · Supabase · Vite · Passive Audit

Lovable App Security & Supabase Scanner

Passive pre-launch security check for Lovable apps: catch leaked Supabase service_role keys, missing RLS signals, public source maps, and missing headers.

Open scanner
Cursor · Vercel v0 · Next.js · Passive Audit

Cursor & 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