Check your own app — free, in about a minute.
The free mini-scan checks your live homepage for TLS/HTTPS basics, response security headers, cookie flags, exposed sensitive files, Firebase/Supabase backend rules, and the WordPress plugin versions your site exposes. You get a score and the finding titles — no account, no card.
Run the free mini-scan →Every Next.js app built by an AI agent ends up with a .env file full of keys — database URLs, payment secrets, AI API keys. Next.js has a clear rule for which of those values reach your visitors' browsers. The problem is that the rule is about names and import paths, not about secrecy — and agents trip over both halves of it.
In Next.js, only variables prefixed with NEXT_PUBLIC_ are supposed to be embedded in the browser bundle. Everything else stays server-side — if it is only ever referenced from server code. Two leak paths break that protection in shipped-fast apps:
Leak 1: The secret that got the prefix. An agent hits an error — a key reads as undefined in a client component — and applies the fix that makes the error go away: rename OPENAI_API_KEY to NEXT_PUBLIC_OPENAI_API_KEY. The app works. The key is also now in the JavaScript every visitor downloads, and "works" is where the session ends. Any key with the prefix must be treated as published, because it is: assume it needs rotating, not just renaming, because bundles get cached, archived, and scraped.
Leak 2: The import that drags the server into the client. A variable without the prefix can still leak if the module that reads it gets imported into client code. A shared config.ts or a utility that reads process.env.DATABASE_URL and is imported by one client component can pull server values into the client graph. Agents refactor for convenience — "just import the helper" — and the boundary moves without anyone deciding it should.
The keys that matter when they leak are the ones that spend money or open data: AI provider keys (billed per call, by strangers), Stripe secret keys (the sk_live_… kind — full account access), database connection strings, and signing/webhook secrets. Not everything in a bundle is a leak: publishable keys (Stripe's pk_…), analytics IDs, and Google's web API keys (AIza…) are public by design — a checker that flags those is crying wolf, and ours deliberately doesn't.
next build, grep the .next/static chunks (or the JS your production site serves) for sk_live, AKIA, -----BEGIN, ghp_, xox, and your own providers' key shapes. Source code tells you what you meant; the bundle tells you what you shipped.NEXT_PUBLIC_ variable should be one you'd happily print on the homepage. If not, it isn't a naming issue anymore — rotate it, move the call server-side, and proxy through an API route..env defeats every rule above; if yoursite.com/.env returns anything but an error, that's the finding that matters most.Your bundle is public, so this check needs no access: our scanner reads the JavaScript and HTML your site serves and looks for the credential shapes that are never public-safe — AWS access keys, Stripe live and webhook secrets, private-key headers, GitHub and Slack tokens — and reports them redacted (prefix and suffix only; the full secret is never stored). It also probes for the exposed /.env and /.git/HEAD files directly.
Related: Exposed .env File Check — the classic version of this mistake, on every stack. Bolt Exposed API Keys — the same leak in builder-generated apps. AI-Generated Code Vulnerabilities — why models keep making this category of error.
Wondering what your bundle is telling the world? Run the free mini-scan at preshipit.com/free-scan — the full scan sweeps your served JS for leaked live secrets and checks for exposed config files.
The PreShipIt Brief — a short weekly email for people shipping vibe-coded apps: the week's important vulnerabilities and launch-safety checks, in plain English.
New and free. Double opt-in: we email you a confirmation link before anything else arrives. Unsubscribe any time.
Check your own app — free, in about a minute.
The free mini-scan checks your live homepage for TLS/HTTPS basics, response security headers, cookie flags, exposed sensitive files, Firebase/Supabase backend rules, and the WordPress plugin versions your site exposes. You get a score and the finding titles — no account, no card.
Run the free mini-scan →← Back home · Run a free mini-scan · Scan my app — $29 · See a sample report