2026-11-30 · Daily security tips
Is your build config copying secrets into the browser anyway?
Removing the NEXT_PUBLIC_ or VITE_ prefix isn't the whole story. Build config can copy a secret into your JavaScript too. In Next.js, anything listed under env in next.config.js always goes into the browser bundle, prefix or not. In Vite, a line like define: { 'process.env': process.env } pastes your build machine's environment in wherever browser code reads process.env, and adding another prefix to envPrefix exposes those variables as well.
Check: open next.config and vite.config. Look for an env block, a define block that mentions process.env, and any envPrefix setting. Then search your built files (.next/static or dist) for sk_, service_role and the names of your secret keys.
Fix: rotate any key you find, take it out of the config, and only read it in server code like an API route or Edge Function.
Is your live site exposing something like this?
The free quick check looks at what your site already serves publicly: secret keys in your JavaScript, open /.env files and /.git folders, Supabase tables readable with your public key, missing security headers, CORS misconfiguration, insecure cookie flags and TLS certificate expiry. No sign-up needed.
No app handy?
Example result · our deliberately broken demo app
6 issues found: 3 critical, 1 high, 1 medium, 1 low
- Critical: Stripe live secret key in public JavaScript
- Critical: /.env file readable by anyone
- High: Git repository exposed (/.git/HEAD)
The demo's problems are planted on purpose. Paste your own URL above to see yours.
No sign-up. Read-only public-resource and protocol metadata checks. No model prompts or tool execution. Scan only sites you own or are allowed to test.
Run on every deploy or use from Cursor / Claude Code via MCP →
Weekly AI-app security checklist
One short email a week: a practical check for apps built with Supabase, Next.js and AI tools (RLS, leaked keys, headers and more). Unsubscribe anytime.