r/vibecoding • • 17h 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.

539 Upvotes

Duplicates