Deleting a leaked API key from your code isn't enough
When an AI tool puts an API key in your frontend, the usual fix is to delete that line and redeploy. The key still works, though, and copies of it can stay in your git history, old deploy previews, and in anyone's browser cache or notes who already grabbed it.
Fix it
- Revoke the key in the provider's dashboard and create a new one.
- Store the new key only in a server-side secret, never in client code.
- Check the provider's usage page for calls you didn't make.
Paste this to your AI tool: "Find every place this app reads an API key in frontend code, move those calls to server-side functions that use server-only secrets, and list each key I need to revoke and replace."
The free ShipWatch scan checks your live app for leaked API keys in client code.