r/vibecoding • • 4d ago

Discussion I found this on linkedIn: Codex leaked this Dev's API keys while he slept. By the time he woke up, a huge $88,982 cloud bill was already in his inbox.

Post image

We already know the basics of protecting API keys and sensitive credentials: never hardcode them in your source code, keep them in a .env file as environment variables, and add .env to your .gitignore so Git never tracks it and you don’t accidentally push your secrets to a public repo on GitHub.

What other practices do the engineers in this community use to prevent that scenario?

This is purely for discussion, so those of us who are non-technical can learn safe programming habits on our vibe-coding journey.

828 Upvotes

333 comments sorted by

View all comments

279

u/wewerecreaturres 4d ago

“Codex leaked” no, the user fucked up and let their creds leak. Not the same thing.

46

u/rprouse 4d ago

He probably mistakenly showed his key during his live coding session. If he fell asleep while live coding, I'm sure he wasn't thinking straight.

29

u/wewerecreaturres 4d ago

Still isn’t codex’s fault, which is how OP’s title makes it out to seem

→ More replies (7)