Skip to content
← AI Roadmap - 76 Steps from Zero to Shipped

stage · Going live

63Secrets and keys

The most expensive node on this page. Read all of it

If you skip everything else - read this.

An access key is a password to some service. To your AI, your database, your payments. Whoever has it can do everything you can. Including spending your money.

The main rule: keys never live in the code. They live in a separate file that doesn't go into history and doesn't travel to the internet. Tell the AI that at the start of the project and it will set it all up correctly itself.

Why this is so serious. Bots crawl the internet around the clock looking for exposed keys. Not "someone might notice eventually" - they find them in minutes. A public repository with a key inside empties an account faster than you can make tea.

And this isn't scaremongering. In early 2026 Moltbook, a social network for AI agents that was itself built with AI, exposed a million and a half access keys, thirty-five thousand email addresses and private messages within three days of launching. The cause was one missed database setting.

And it's not a one-off. In June 2026 researchers checked over a thousand sites built with Lovable, Bolt, v0 and similar builders: nearly every one had at least one hole, almost a third had a serious one, and in 172 cases any passer-by could wipe other people's data. And according to Veracode's summer report, AI writes code with a known vulnerability in almost half of all tasks, and that hasn't improved in a year: the models are getting smarter, not safer.

The conclusion isn't "don't use AI". The conclusion is: AI doesn't think about security on its own unless you ask it to. So ask. Directly: "check whether there are holes here", "check that secrets aren't getting into the repository". It knows how; it just doesn't do it by default.

And I had my own incident: an access key once ended up written somewhere it shouldn't have been. Dealing with the aftermath took several days. Five minutes of attention at the start is cheaper.