derek
@derek
Not sure if this was even the issue, but a friendly reminder out there for folks (including myself): regularly audit what environment variables appear in client-side code. NEXT_PUBLIC_*, for instance. Vibe coding is really, really bad at this.
3 replies
0 recast
10 reactions
Arti Villa
@artivilla.eth
Can you further explain this? Next public is supposed to be on the client side. How was an attacker able to override it? If you wanna share a code sample, please do so.
1 reply
0 recast
0 reaction
derek
@derek
NEXT_PUBLIC is supposed to be client side, but some environment variables should not be prefixed with NEXT_PUBLIC. Private keys, API secrets, etc. should all be consumed in API routes that the client-side code calls, rather than consumed directly in client-side code.
1 reply
0 recast
0 reaction
Arti Villa
@artivilla.eth
I got that. I guess I was asking which key was exposed that rerouted the app.
1 reply
0 recast
0 reaction