Plainmend

Notes

Check your NEXT_PUBLIC_ variables before you deploy

In Next.js, any environment variable starting with NEXT_PUBLIC_ is baked into the JavaScript your visitors download. AI tools sometimes add that prefix just to make an error go away, and a secret key ends up readable by anyone.

Quick check: search your project for NEXT_PUBLIC_. Anything that looks like a secret, such as a Stripe secret key, a database password or an admin token, should lose the prefix and move to server-only code. Then rotate that key, because it may already have been seen.

Example (illustrative only, not a real customer): NEXT_PUBLIC_OPENAI_KEY=sk-... in a front-end app.

Want a second pair of eyes? Run a free scan at plainmend.com.