A secret key is visible in your page source
Anyone can press 'View source' and copy this key, then run up your bill or read your database. Bots scan for exactly this, all day.
What we saw
Stripe secret key: sk_l…9J0x
Read the fix prompt
A secret key is exposed in my site's public HTML/JavaScript. Do this in order: 1) find every place the key appears in my codebase, 2) move it to a server-only environment variable (no NEXT_PUBLIC_ / VITE_ prefix) and call that API from a server route or function instead of the browser, 3) remind me to ROTATE the key in the provider's dashboard because it's already leaked, 4) check git history and tell me if it was committed. Show me each file you change.
