Live data from Hacker News

€54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

discuss.ai.google.dev

31–40 of 325 posts

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#31
post #11

> Are there recommended safeguards beyond ... moving calls server-side? This implies the API calls originated in the client, suggesting the client may have had they API key.

That's standard for Firebase apps. It's also recommended by Google (they describe the keys as "public by design").

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#32
post #15

[flagged]

> — billing alerts fire in hours, damage happens in minutes. And why do you need to use AI to tell us that. How much shorter could the prompt have been?

You are getting down voted but the first thing I thought when I read the above comment you replied to was that it was written by an LLM as well. It has all the stylings of it. Word choice, sentence structure, phrasing, metaphors, etc.

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#34
post #2

That's fucking bonkers that nothing in the system could see this as unusual and worthy of throttling. The embarrassment of this -- that a company LITERALLY SELLING machine learning services and expertise -- cannot spot such a thing... This should have led them to deal with this internally and refund it. Just... Wow Google.

there is no way to cap your billing on gcp. you can get notifications but that's it. i don't want to get throttled below my quota but some type of spend limit would be good.

and the notifications can be delayed because the spending system is not updated in real-time, so even if you have a Cloud Task triggering on spending to disable the project it may be too slow and several thousands may already be spent.

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#35

[flagged]

This reads like 100% an LLM comment. by design -- the enforcement

Nothing new here - what is new is the

A thing before anyone noticed - another thing, billing in hours, damage in minutes.

has the signal, doesn't expose the control

Every one of those "exposes the signal" to me.

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#36
post #32
post #15

Earlier quoted context omitted.

> — billing alerts fire in hours, damage happens in minutes. And why do you need to use AI to tell us that. How much shorter could the prompt have been?

You are getting down voted but the first thing I thought when I read the above comment you replied to was that it was written by an LLM as well. It has all the stylings of it. Word choice, sentence structure, phrasing, metaphors, etc.

[deleted]

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#37

[flagged]

Important to note that, even to this day, Google's AI Studio Build Mode still recommends getting around this "client visible by design with very low enforceable protections" by publicly exposing an AI proxy with zero protection [1]. They don't care.

[1] https://github.com/qudent/qudent.github.io/blob/master/_post...

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#38

Considering the amount of repositories on public GitHub with hard-coded Gemini API tokens inside the shared source code ( https://github.com/search?q=gemini+%22AIza%22&type=code ), this hardly comes as a surprise. Google also has historically treated API keys as non-secrets, except with the introduction of the keys for LLM inference, then users are supposed to treat those secretly, but I'm not sure everyone got that…

theres not a single real gemini api key in the results

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#39

Considering the amount of repositories on public GitHub with hard-coded Gemini API tokens inside the shared source code ( https://github.com/search?q=gemini+%22AIza%22&type=code ), this hardly comes as a surprise. Google also has historically treated API keys as non-secrets, except with the introduction of the keys for LLM inference, then users are supposed to treat those secretly, but I'm not sure everyone got that…

Um. What? In what world are API keys not secrets?

Re: €54k spike in 13h from unrestricted Firebase browser key accessing Gemini APIs

#40
Two things that should be default on any GCP project touching generative-AI APIs:

1 API-key restrictions by HTTP referrer AND by API (`generativelanguage.googleapis.com` only),

2 a billing budget with a Pub/Sub "cap" action, not just an email alert. Neither is on by default, and almost nobody sets them before shipping. 13 hours is actually fast for detection. most teams find out at end-of-month reconciliation.

Post reply on HN