Hmmm my idea would be<p>"Hello from github,<p>We detected that you uploaded credentials to NAME_OF_REPO. We strongly advise against this as it allows attackers to easily gain unauthorized access to your software and infrastructure.<p>Have a look at this blog where we discuss alternatives"<p>EDIT:
Just to be clear, I'm not suggesting a ban at all, just a friendly email in response to commits that introduce credentials to public repos
The wonders of the "Googledork". There is a lot of information out there which definitely shouldn't be public: <a href="https://www.exploit-db.com/google-hacking-database/" rel="nofollow">https://www.exploit-db.com/google-hacking-database/</a>
It's worth pointing out that some of these are configuation examples, illustrations of how to set something up. (Though of course that carries the risk that less thorough users just copy-paste that into production and call it a day.)
One of the more amusing patterns I spotted in the URLs is where an alarming amount of the filesystem appears to be exposed, e.g.:<p>www.dulceswilly.com/mysql/BHP_sym/root/usr/local/etc/apache22/server.key<p>If I was on a non-company IP, I'd be tempted to poke around and see what else is visible...
You should check out how many services have their entire git repo of their service openly accessible (this allows getting the data out of the git objects, as well as the history).<p>Quite often you can go to domain.tld/.git/ and find the files if you know their names. Even major sites - The Hill only fixed it in the past few days.
I was a little surprised to see an Apple domain in there, but I can't really tell what the private key was for (could have been a test or an example). It looks like it's either an outdated result or an Apple engineer quickly saw this and fixed it because the page 404s now.
that yields just 7 pages (10 items each) so it's probably pretty irrelevant.<p>but of course you are welcome to share your run of the mill anecdotes about some intern once accidentally publishing passwords - etc. :)
Slightly related question about API keys that rely on referer (say Google Vision) - what stops me using curl to spoof referer and rake in thousands in someone’s bill (15 cents per 1k recognitions)?<p>I assume there’s some IP based quota, but I haven’t seen a knob for that on GCP at least.
Can someone explain why the inurl:server is used? Wouldn't this also work without that (and reveal more results where the keyfile has been renamed)
The sixth link from the Google result, <a href="https://jpl-vmdb03.inetuhosted.net/sjsuvc.drivingcreative.com/server.key" rel="nofollow">https://jpl-vmdb03.inetuhosted.net/sjsuvc.drivingcreative.co...</a>,<p>Is that the JPL I thought it was?
This I pure paranoia fuel. I don't think I've done this (or what someone else mentioned about leaving the .git folder open in the server) but I'll double check anyway.