ShipBastion / Security guides / Check your JavaScript bundles for leaked API keys
Check your JavaScript bundles for leaked API keys
Anything in a NEXT_PUBLIC_ or VITE_ variable ends up in the JavaScript every visitor downloads. That is fine for publishable keys and a disaster for secret ones.
Free scan. Sign in with Google to see the full report; paid plans start with a 7-day free trial.
Public by design vs secret
Safe in the browser: Stripe pk_live_, Supabase anon key, Firebase web config, Google Maps keys restricted by referrer. Never in the browser: Stripe sk_live_ or rk_live_, OpenAI and Anthropic keys, AWS AKIA access keys, Supabase service_role, database URLs.
Grep your build
grep -rEo 'sk_live_[0-9A-Za-z]{20,}|AKIA[0-9A-Z]{16}|sk-(proj-)?[A-Za-z0-9_-]{20,}|service_role' .next/static dist/ 2>/dev/null | sort -uAfter a leak
- Rotate the key at the provider first; deleting it from the code does not help, it is already in caches and archives.
- Move the call behind your own server endpoint and check the provider's usage logs.
- Disable public source maps, which expose original source including comments.
Try it on your own domain
Free scan, no card. Pro is $19/mo after a 7-day free trial and covers all four scanners: VibeShield, CiteReady, InboxShield and BrandShield.
FAQ
How does ShipBastion find leaked keys?
VibeShield downloads your HTML and up to 24 JavaScript bundles and runs 221 secret rules over them.
Related
Security checklist for apps built with Cursor, Lovable, Bolt and v0
A pre-launch security checklist for AI-built apps: leaked keys in bundles, Supabase RLS, exposed .env and source maps, security headers, TLS...
Supabase RLS security audit: find tables anyone can read
Step-by-step Supabase Row Level Security audit: enable RLS, write owner policies, test what the public anon key can read with curl, and keep...
ShipBastion vs Vibe App Scanner
Honest ShipBastion vs Vibe App Scanner comparison: $19/mo vs $29/mo, 221 vs 150+ secret rules, all 12 Mozilla Observatory tests, TLS 1.0/1.1...