News for hackers. Stuff that matters.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by paxys on Thursday October 13, 2022 @06:07PM (#33197079)
Github supports this out of the box – https://docs.github.com/en/code-security/secret-scanning/abo..., and recognizes tokens from a lot of services.
Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by derefr on Thursday October 13, 2022 @06:38PM (#33197385)
In fact, you can apply as a Github "secret scanning partner" to have your own secret's format (regexp) be a part of this secret scanning, with a webhook to your servers whenever they find one, so that you can do the credential-invalidation on your own backend + send the kindly-worded email from your own domain.

Mind you, your secrets need to have a distinctive format in order for this to work. Probably a distinctive prefix is enough.

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by lupire on Thursday October 13, 2022 @06:50PM (#33197497)
Does GitHub not postpone publishing new verisons until after the secret scanning is done?

Also I'd hope that Google is scanning BigQuery queries for that abuse signal.

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by dantiberian on Thursday October 13, 2022 @06:56PM (#33197550)
The GitHub public events API is delayed by 5 minutes, presumably to give secret scanning partners time to react before commits are made public.

https://github.blog/changelog/2018-08-01-new-delay-public-ev...

Disclosure: I'm an ex-GitHub employee but was not involved in the secret scanning API.

Re:Toyota Accidently Exposed a Secret Key Publicly on GitHub... by derefr on Thursday October 13, 2022 @08:54PM (#33198443)
Makes sense; but doesn't help the companies who aren't aware of the secret-scanning service / the ability to become a secret-scanning partner. If you have your own little API SaaS with its own API-key format, then you've probably got API keys exposed in the Github dataset; and someone's probably already found and extracted them. (It happened to us!)

Mind you, the Github dataset isn't the leak itself; the leak is the public repo that the user pushed their key to. The dataset just makes such searches scalable / cost-effective to third parties who aren't already indexing Github for some other reason.