The AI said my key file would never be published. Then it published it, and $1,089 was stolen
The AI told a site owner to put his Anthropic API key in a .dev.vars file and said the file would never be published. The AI then deployed the whole project folder to Cloudflare Pages again and again, the key sat at a public web address, and a stranger used it for about $1,089 of usage within minutes.
How it works
- The AI writes setup steps telling him to paste his API key into .dev.vars and says it will never be published
- The AI deploys the whole project folder with the Pages deploy command, first on September 20 and repeatedly until at least October 6
- Every deploy puts .dev.vars at a public address
- On October 13 the key is stolen and used for about $1,089 of charges within minutes
- Support declines a refund
- He fixes it himself by deploying only a public folder with a check for secret files
Why it’s worth knowing
The same agent that promised the key file stayed private ran the deploys that put it on the public web.
Where it’s from
Summarized from a public post on github.com. See the original ↗