TruffleHog reports that Google API keys can silently gain access to Gemini when the Generative Language API is enabled on the same GCP project, despite years of guidance that these keys were safe to embed client-side for services like Maps and Firebase. They found 2,863 live keys in the November 2025 Common Crawl dataset, and showed that leaked keys could access Gemini endpoints like /files and /cachedContents and incur usage charges. Mitigation: audit projects with the Generative Language API enabled, restrict keys by API and application, and rotate any key that is public or unrestricted.
https://trufflesecurity.com/blog/google-api-keys-werent-secrets-but-then-gemini-changed-the-rules







