> In this post, I’m going to show exactly how hackers instantly harvest information committed to public Github repositories... A few days ago I published my blog to GitHub, with my MailGun API key in the config file (stupid mistake, I know). In less than 12 hours, spammers had harvested the key AND sent a few thousand emails with my account, using my entire monthly limit. Thankfully I was using the free MailGun accou…
I had a similar but less pleasant experience. I had decided to opensource an old side project of mine, that gets a good amount of users daily. And by that, it was just initially to make the repo public. But I had totally forgot about the mail server keys- this was a paid mail server, so you can imagine my disbelief when I get an email of a $1000 bill and a complaint saying that I had sent upwards of 250k emails with…
Why Deleting Sensitive Information from GitHub Doesn't Save You
71–80 of 91 posts
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#72Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#73Earlier quoted context omitted.
If you're feeling fancy, you can use my library to asymmetrically encrypt credentials using RSA keys [1]. [1]: https://github.com/jacobgreenleaf/greybox
The fact that this uses RSA directly seriously worries me. Is the RSA library using OAEP? Does it properly blind it's inputs before signing? What's the modulus? Does key generation avoid using weak keys? Maybe the answer to these questions and others is satisfactory, but getting RSA catastrophically wrong is easy enough that I'm extremely skeptical that a library will get it right. Honestly, I'd be infinitely more li…
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#74There's a fairly straight forward pattern for keeping sensitive credentials out of github. It comes straight from http://12factor.net/config store configuration data in the environment. What I do for most projects is keep the tree containing the working directory in a directory that has some other items that don't belong on github (like the project brief, my emacs bookmarks file, random notes related to the project e…
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#75Duh?
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#76TLDR: It won't save you because people could have copied the information before you deleted it. Duh?
This is a bit more nuanced than your summary because GH makes it easy. Without the events API, you would have to poll the various repos to find out if changes happened
Furthermore, the existence of GHTorrent demonstrates the ease with which this information can be harvested
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#77Earlier quoted context omitted.
I had a similar but less pleasant experience. I had decided to opensource an old side project of mine, that gets a good amount of users daily. And by that, it was just initially to make the repo public. But I had totally forgot about the mail server keys- this was a paid mail server, so you can imagine my disbelief when I get an email of a $1000 bill and a complaint saying that I had sent upwards of 250k emails with…
I'm curious. Did they excuse the bill or was this a $1000 lesson?
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#78Earlier quoted context omitted.
I had a similar but less pleasant experience. I had decided to opensource an old side project of mine, that gets a good amount of users daily. And by that, it was just initially to make the repo public. But I had totally forgot about the mail server keys- this was a paid mail server, so you can imagine my disbelief when I get an email of a $1000 bill and a complaint saying that I had sent upwards of 250k emails with…
To be fair to you, part of being a paid mail provider is dealing with this kind of stuff on the daily, I am surprised they didnt stop it WAY before it hit that send count.
Also, this was a reputable email provider that many of you know of (i believe it went thru one of the incubators).
Re: Why Deleting Sensitive Information from GitHub Doesn't Save You
#79Earlier quoted context omitted.
My point in my OP was to not play the game of catch-up, don't even pitch in your vuln strs. Any time you want to show me a 100% future-proof algorithm for sensitive-info detection that works across any/all code on github, I'd be happy to toss my hat in and say, "I was wrong", until then, people will never ever beat 0days they don't know exist (0day being more than just a SW exploit). Just do.not.commit.sensitive.info…
You're straw-manning. The suggestion was that it would be useful to have a best-effort system to try to detect when people make mistakes. I don't think there's any suggestion that it should be something that people rely on, or that the system should or could be perfect - merely that it would be useful.
Yes, Github can/should help, but developers should not think they're owed it just because they constantly check in sensitive info to a website, that's all.