r/TechLeader
•
u/CriticalPhen
•
5d ago
I checked my own vibe coded app before launch. I need to warn you about what I found
After the $88,982 codex post here i got scared enough to actually check my app before sharing it. i'm not a dev, i built a booking app for my partner's studio with cursor and claude over the summer. supabase, stripe, openai for a little chat helper, resend for emails.
i asked a friend who does backend for a living to sit with me for an hour. we only used the browser and devtools, nothing fancy.
first thing he did was open the network tab and then search the javascript files. my openai key was in there. so was my stripe secret key, the sk_live_ one, not the publishable one. so was the resend key. plain text, in the files every visitor downloads.
my .env was gitignored so i thought i was fine. turns out anything starting with VITE_ gets put into the frontend on purpose. claude named them that way so the chat worked from the browser, and it worked, so i never asked why.
second thing he did was type my domain followed by /.env. it wasn't there, thank god, because my host serves only the build folder. but he checked my server logs and there were 212 requests for /.env in the 2 weeks the app had been online. bots try it on every site, all day. nobody had even heard of my app yet.
third thing, the openai key had no spending limit. so the key was public, bots were already probing, and the only thing between me and one of those bills was nobody having looked yet.
what i did that night. rotated all 3 keys, because deleting them from the code does nothing if someone already copied them. put a $20 hard cap on openai, not an alert, a cap. moved the openai and stripe calls into supabase edge functions so the browser never touches a key. and i stopped keeping a .env file around at all, the keys live in infisical now and get pulled in when the functions run.
one evening, and most of it was the rotating.
if you built something with AI and you've never checked, do these two things today. run your build, open the output folder and search for sk- and key. then check whether your api keys have a hard cap. it takes 5 minutes and i really wish i'd done it before launch, not after.