Re:Grep.app – Search across a half million Git repos
by capableweb on Tuesday February 07, 2023 @08:27AM
(#34692417)
As far as I can tell, all the git repos come from GitHub, and GitHub automatically sends you a warning if you commit access keys of various kinds (and I seem to remember they even de-activate some, maybe AWS keys, automatically? Not 100% sure about this). Most of the keys shown are unlikely to be working, especially the ones older than just a couple of days (either owner notice, or someone else was faster than you, got access and regenerated new keys for themselves)
Re:Grep.app – Search across a half million Git repos
by IncRnd on Tuesday February 07, 2023 @08:46AM
(#34692631)
> or someone else was faster than you, got access and regenerated new keys for themselves
There are many people who do these types of searches - regularly. If there is any key material checked into gh, consider it immediately compromised, even if the repo is removed.
Re:Grep.app – Search across a half million Git repos
by capableweb on Tuesday February 07, 2023 @08:48AM
(#34692644)
Tons of automated scraping for these sort of things as well, with the whole flow of "check if key is working, check permissions, if authorized, generate new key and deactivate old one".
Re:Grep.app – Search across a half million Git repos
by IncRnd on Tuesday February 07, 2023 @09:13AM
(#34692960)
Yes. There are indeed several mitigations in place. However, my point was that within 5 seconds of looking at this tool I was able to uncover hundreds of potential issues. There are many other regexs I have on my list. Please don't fall into the trap of "we have anti-virus, so we can't get attacked."
Re:Grep.app – Search across a half million Git repos
by capableweb on Tuesday February 07, 2023 @09:25AM
(#34693136)
Sorry if I was unclear, my previous comment was about attackers doing that in order to compromise infrastructure, not that companies are doing it in order to defend themselves. But companies probably do it to defend themselves as well, but I'm not as familiar with that as with the other side of things.
Re:Grep.app – Search across a half million Git repos
by greysteil on Tuesday February 07, 2023 @09:01AM
(#34692809)
GitHub PM here, just confirming that that's correct (re: us sending detected secrets to the relevant service provider, who take action automatically). There's more detail here: https://docs.github.com/en/code-security/secret-scanning/abo....
Re:Grep.app – Search across a half million Git repos
by iambateman on Tuesday February 07, 2023 @01:08PM
(#34696499)
This is probably one of the single most important security measures on the whole internet.
Thanks for keeping an eye out.
Re:Grep.app – Search across a half million Git repos
by abraham on Tuesday February 07, 2023 @09:16AM
(#34693004)
Most of the Google API keys look like they are client side keys and should be configured to only work on specific origins or apps.
Re:Grep.app – Search across a half million Git repos
by TYMorningCoffee on Tuesday February 07, 2023 @10:17AM
(#34693891)
Your search has a lot of false positives like AKIAIOSFODNN7EXAMPLE
Re:Grep.app – Search across a half million Git repos
by madeofpalk on Tuesday February 07, 2023 @11:55AM
(#34695263)
Most of these actually look like fake keys to mock data in unit tests.
Re:Grep.app – Search across a half million Git repos
by teaearlgraycold on Tuesday February 07, 2023 @01:08PM
(#34696485)
Hacker noises - "I'm in"
Re:Grep.app – Search across a half million Git repos
by kristopolous on Tuesday February 07, 2023 @01:50PM
(#34697213)
----- BEGIN RSA NOT SO PRIVATE KEY -----
Re:Grep.app – Search across a half million Git repos
by arp242 on Tuesday February 07, 2023 @01:57PM
(#34697332)
Many of these are tests, false positives (e.g. base64 images or "Migration1599570560FixSlovakiaDisplayedAsSloveniaTest"), or examples from documentation.
Can't find a single match for an actual API key.
Re:Grep.app – Search across a half million Git repos
by codalan on Tuesday February 07, 2023 @04:10PM
(#34699701)
These are probably invalid by now.
https://grep.app/search?current=2&q=api_key%20%3D%20%22%5Ba-...
As others have posted, Github implemented an alerting system for keys/passwords/etc. that have been checked into the codebase. My guess is most of these will be invalidated by now, either by the developer requesting a new key (and not publishing it), or the provider invalidating it for them.
Re:Grep.app – Search across a half million Git repos
by zikohh on Tuesday February 07, 2023 @05:18PM
(#34700616)
https://sourcegraph.com/search?q=context:global+AKIA%5B0-9A-...
Sourcegraph is much better than this site.
This was my first search to show AWS API Keys. [1] and my second to show google API keys. [2] Unfortunately, there are many more of these types of searches - and far too many results.
[1] https://grep.app/search?q=AKIA%5B0-9A-Z%5D%7B16%7D®exp=tr...
[2] https://grep.app/search?q=AIza%5B0-9A-Za-z%5C%5C-_%5D%7B35%7...