News for hackers. Stuff that matters.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by Analemma_ on Monday August 31, 2015 @05:57PM (#10149322)
This is becoming such a common story that I'm starting to think it's a little irresponsible of both Amazon and GitHub to not react better to it. Clearly Amazon is capable of detecting when this happens as evidenced by their rapid response; when they see AWS keys published to GitHub, they should block the account, or at least prevent it from spinning up any new instances. They can then contact the owner over e-mail to follow up.

Same thing with GitHub. When they see an AWS key, they need to block that push and send back a message saying "If you're really, really, REALLY sure you want to do this, add .allowawskey at the root of your commit and push again". There's no excuse for letting people shoot themselves in the foot like this over and over.

(Edited for typo)

Re:How a bug in VS2015 exposed my source code on GitHub and ... by Alupis on Monday August 31, 2015 @06:09PM (#10149387)
Is it really on the web service companies to make sure you (the developer) don't do anything stupid?

The article author could have avoided a lot of headache if he simply checked the repo before walking away. Red flags should have gone up as soon as he received the first weird Amazon messages, but he still didn't think to check his own work.

The author calls this a "Data Breach" but in reality it was a "Data Leak".

Re:How a bug in VS2015 exposed my source code on GitHub and ... by onion2k on Monday August 31, 2015 @06:17PM (#10149443)
Is it really on the web service companies to make sure you (the developer) don't do anything stupid?

Yes. The web service company should look at it as basic security - if people are using their service to discover private information and use it to defraud their users, even if the users have been stupid enough to upload that information publicly, the company should do what they can to mitigate the problem.

If I post a photo of my credit card on Twitter I would expect my bank to limit the damage as much as possible by declining obviously fraudulent transactions. Ultimately it's my own fault, and I would be liable for the costs, but that doesn't mean the bank should just let it happen if they can do something to stop it.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by 15155 on Monday August 31, 2015 @07:57PM (#10149852)
> mitigate the problem.

This seems like very minor engineering effort on behalf of GH - simple regexes, even.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by onion2k on Tuesday September 01, 2015 @01:45AM (#10150919)
To detect the key, sure. But then there's the interface design to inform the user, hooking in to an email to notify the user if they're committing via git, a system to disable the option if necessary, monitoring the AWS format in case it changes, dealing with other formats that are requested by AWS's competitors, and so on.

I don't think this would be a minor undertaking or simple in any way, but it is important enough that a provider (and target) the size of GitHub should still do it.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by RussianCow on Monday August 31, 2015 @06:13PM (#10149414)
Amazon would save some money by doing this, since they usually reimburse "victims" of public AWS keys (at least on the first instance) and eat the cost.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by spdionis on Tuesday September 01, 2015 @09:41AM (#10152213)
They don't "reimburse" anything. They only cancel the due amount. The only thing they lose is their wasted computing power (and some support costs) and I think the RAW computing power is very cheap to them, especially considering their scale. The cost in terms of support for the victims is probably bigger but still not significant.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by RussianCow on Tuesday September 01, 2015 @12:55PM (#10153846)
It's still a cost that could be mitigated with a couple hours of someone's time.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by tolmasky on Monday August 31, 2015 @06:20PM (#10149457)
GitHub is a service. Its not their job to offer me issue tracking, or pull requests, or really much of anything. They CHOOSE to offer me things, and if those things are interesting, I CHOOSE to pay them. As users, we can certainly declare that we believe AWS key detection to be of foundational importance to a code sharing community, and signal them to thus take action or risk losing us as paying customers. I would certainly feel better if this was a feature, given its apparent ease of implementation and huge head aches it would solve.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by alkonaut on Monday August 31, 2015 @06:19PM (#10149454)
> Is it really on th web service companies [...]

Yes. Or, it's not so much a responsibility as it is an opportunity. I'd choose the provider that stops me from shooting my foot.

I assume AWS has spending caps for each account. My credit card company blocks my card and calls me if I spend in a suspicious pattern. And so on.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by mhuffman on Monday August 31, 2015 @06:17PM (#10149439)
Maybe not, but it think it is the web service company's responsibility to alert and contact you on suspicious activity ... like a sudden $6,000 jump in service usage of spot instances in regions you have never used before.

I mean a quick automated email would be enough for you to take action. The way it is set up now, you pay for it and humbly beg Amazon to deduct those charges if they see fit.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by Alupis on Monday August 31, 2015 @06:19PM (#10149450)
I agree, and it seems this sort of thing is already in place on AWS, but the author didn't heed the first two warnings. Short of just blocking things from happening and risking inconveniencing other customers, I don't see much more AWS could have done that would be reasonable.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by runamok on Tuesday September 01, 2015 @12:25AM (#10150726)
You can easily set up billing alerts in cloudwatch to do this. I have done so. I agree by default it should prompt you to do so during the aws on boarding process.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by koffiezet on Wednesday September 02, 2015 @12:42PM (#10160458)
> The article author could have avoided a lot of headache if he simply did not check in secrets into any source control system.

FTFY

It baffles me that people actually do this. Passwords and secrets DO NOT BELONG THERE. Even your 'if he simply checked the repo' statement is in my view completely crazy. No you should not have to worry about that, because that should not be there at all. Leaking your source-code should not result in a system-breach at any point.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by pbreit on Monday August 31, 2015 @06:21PM (#10149460)
It's not "on" them but it would behoove them to perform better than this tale suggests. And they are not doubt capable of such.

Or just waive the charges.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by Fomite on Monday August 31, 2015 @06:21PM (#10149459)
GitHub is a value added service.

Making sure I don't do something stupid and expensive is a value add.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by nsxwolf on Monday August 31, 2015 @06:23PM (#10149472)
There's a huge amount of value in a service that insulates you from mistakes like this. You really, really have to know what you're doing with EC2 because it is a loaded gun.

Personally, I don't like using things that are covered in spring loaded booby traps that require eternal hypervigilance in order to avoid nasty financial consequences. Certainly not when deploying something that would be right at home on something like Heroku.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by Alupis on Monday August 31, 2015 @06:25PM (#10149490)
> You really, really have to know what you're doing with EC2 because it is a loaded gun.

That's a fair point, but keep in mind the article author was given several warnings that something was wrong, but failed to correct the problem each time (which resulted in the huge bill he ultimately received).

At what point is the responsibility on the author here?

Re:How a bug in VS2015 exposed my source code on GitHub and ... by chrismcb on Wednesday September 02, 2015 @02:45AM (#10157757)
The author deleted the old key and created a new one and changed his password as soon as he was notified. How did he fail to correct the problem? What else should he have done?
Re:How a bug in VS2015 exposed my source code on GitHub and ... by tomschlick on Monday August 31, 2015 @06:02PM (#10149355)
> or at least prevent it from spinning up any new instances

This is the answer I would like to see implemented. If they can detect the key they can put a freeze on the account so that only existing resources are available.

They should also have a timeline of all created instances in every zone so you can see what has happened in the last x hours and kill all instances at once.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by voltagex_ on Monday August 31, 2015 @07:14PM (#10149703)
Two things would make controlling these situations easier:

* Allow me to see all instances in all regions from a single screen

* When accounts are first created for AWS, set up some sane default IAM policies and/or hire some UI designers to fix that godawful mess.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by kylec on Monday August 31, 2015 @06:01PM (#10149351)
This is a really good point. There was another post recently linking to a search for id_rsa files (SSH private keys) on GitHub. Instead of allowing people to publish sensitive things like that accidentally, GitHub really should require an extra confirmation.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by inopinatus on Monday August 31, 2015 @06:53PM (#10149611)
I wonder if you actually read the story. The author displays incompetence in technology administration at multiple steps.

From committing the basic design error of using hard-coded credentials at all; to committing them to any kind of repository; to failing to check on the visibility of that repository; to giving those credentials privileges they did not need; to failing to act effectively on warning messages.

And all this, apparently, is laid at the feet of Visual Studio.

I have no love of the Microsoft ecosystem, but the author does not acquit themselves well in this incident. The arrogant claims of seniority in the opening paragraph seem ironic in this light.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by LeonB on Monday August 31, 2015 @09:03PM (#10150096)
> all this, apparently, is laid at the feet of Visual Studio

I wonder if you actually read the story.

He admits several faults including most if not all of those you mention.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by inopinatus on Monday August 31, 2015 @09:14PM (#10150141)
So what? Admitting fault isn't absolution. He really does go out of his way to blame the tools.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by schrodinger on Tuesday September 01, 2015 @12:14AM (#10150691)
The tool has a huge bug! Even if he wasn't putting credentials in there, it could still have led to sensitive source code getting out or something!
Re:How a bug in VS2015 exposed my source code on GitHub and ... by x0n on Tuesday September 01, 2015 @09:40AM (#10152210)
Article updated - VS wasn't the issue. He had installed a 3rd party github extension (from github themselves) that overrides the built-in Git support in visual studio... bug was found, confirmed and fixed yesterday though, so a quick turnaround.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by hamami on Monday August 31, 2015 @08:20PM (#10149953)
Exposing an AWS key through a public repo happened to me a few years ago and AWS support called me to confirm whether I was aware of the suspicious activity, when I stated I do not know what's going on they immediately blocked the account and told me I wouldn't be responsible for the cost. Mine was actually much worse, the account was billing a thousand dollars every hour. They told me I'd have to sign up again with a different account.. I'm surprised this process was not followed in author's case.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by basch on Monday August 31, 2015 @06:14PM (#10149421)
obviously someone is good at detecting it considering 6.5k in usage got racked up with data scraped within 10 minutes of commit
Re:How a bug in VS2015 exposed my source code on GitHub and ... by dsp1234 on Monday August 31, 2015 @06:25PM (#10149486)
The quick bitcoin mining spin-ups, and the initial email from Amazon about the key going public, are (probably) thanks to the github events firehose.

https://github.com/hootware/github-firehose-node

http://blog.scalyr.com/2013/10/exploring-the-github-firehose...

Re:How a bug in VS2015 exposed my source code on GitHub and ... by chrismcb on Wednesday September 02, 2015 @02:48AM (#10157764)
It sounds like it happened the next day, after he changed the keys.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by vacri on Monday August 31, 2015 @06:01PM (#10149346)
AWS do do things. They have service limits and routinely waive charges from abuse events like this.

I do wonder if GitHub's events firehose has benefits that outweigh all the compromised credentials, though. Not just limited to AWS keys.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by Analemma_ on Monday August 31, 2015 @06:09PM (#10149388)
> They have service limits and routinely waive charges from abuse events like this.

That's almost worse though. Maybe I'm being unfair here, but the fact that they will waive charges immediately if you ask, but don't just block them pre-emptively, tells me that they're hoping at least some customers (with deep pockets and automated billing that no one pays attention to) will just pay the bill and never notice. Maybe they're making more money from that than they're losing by waiving charges on compromised accounts for customers who ask.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by slg on Monday August 31, 2015 @06:25PM (#10149484)
Devils advocate, wouldn't you rather have illegitimate charges waived after the fact that legitimate charges declined because their algorithm threw up a red flag? Something like being posted to HN could cause a huge spike in charges for your account in a similar way as leaking your keys and it would be beyond frustrating to see that opportunity disappear because Amazon saw your bill spike.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by inopinatus on Monday August 31, 2015 @06:45PM (#10149583)
Don't be ridiculous. AWS want legitimate revenue, not brand damage.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by cwisecarver on Tuesday September 01, 2015 @12:12AM (#10150685)
You really want GitHub analyzing your code? REALLY? If the internet found out they were analyzing every push the backlash would be 10x what it is now.

Even if it's public... That's still a Gmail-esque situation that would immediately raise privacy concerns.

Developers should pay attention to what they're doing. Your AWS keys shouldn't even been in your private repo. You should find another way or you shouldn't be using a third-party for source control.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by bhandziuk on Wednesday September 02, 2015 @01:12PM (#10160628)
Looks like someone is analyzing it anyway. May as well be to your benefit.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by einrealist on Monday August 31, 2015 @06:24PM (#10149481)
It would probably be easy for Amazon to offer an automatic key blacklisting feature....
Re:How a bug in VS2015 exposed my source code on GitHub and ... by teuna on Monday August 31, 2015 @06:27PM (#10149501)
Natural selection at work, do not disturb.
Re:How a bug in VS2015 exposed my source code on GitHub and ... by tomphoolery on Monday August 31, 2015 @06:15PM (#10149427)
"letting people shoot themselves in the foot like this over and over"

Stop doing it in the first place, problem solved. I don't see why GitHub or Amazon need to hold my hand through a serious process. It would diminish the importance of what you're doing.

Also, this guy didn't just use AWS keys...he clearly used AWS master keys...which has not been the recommended course of action for AT LEAST THREE YEARS...if he had used a proper IAM user with only the access he needed, this wouldn't have happened. Sorry, but that was just irresponsible.

Re:How a bug in VS2015 exposed my source code on GitHub and ... by s73v3r on Monday August 31, 2015 @06:34PM (#10149532)
"I don't see why GitHub or Amazon need to hold my hand through a serious process. It would diminish the importance of what you're doing."

No it wouldn't, not at all. Not unless you're one of those, "REAL MEN us {$editor}" people, in which case no one cares about your opinion.