News for hackers. Stuff that matters.
Re:SSH Keys on GitHub by bagels on Tuesday August 18, 2015 @11:57AM (#10079881)
Does Github have a responsibility to help people out with this kind of thing? What do you all think?
Re:SSH Keys on GitHub by nodesocket on Tuesday August 18, 2015 @12:38PM (#10080207)
Responsibility? No, why would they. But.... I think it would be a great feature for GitHub to passively scan repos and look for common security oversights. They could then just send an e-mail notification about the issue.
Re:SSH Keys on GitHub by grhmc on Tuesday August 18, 2015 @11:59AM (#10079892)
No. There are valid cases to upload SSH keys and other certificates or secrets. Preventing it would be annoying, and near impossible to be very effective.

Just my $0.02.

Re:SSH Keys on GitHub by jethro_tell on Tuesday August 18, 2015 @12:02PM (#10079912)
I agree with you, but I can't imagine a use case for a secret that's not secret.
Re:SSH Keys on GitHub by mikegirouard on Tuesday August 18, 2015 @12:49PM (#10080313)
I believe Vagrant uses (or previously used) an insecure, public keypair[0] to keep things simple.

Aside from things like that, I can't see it being a _common_ use case.

[0]: https://github.com/mitchellh/vagrant/tree/master/keys

Re:SSH Keys on GitHub by swozey on Tuesday August 18, 2015 @12:06PM (#10079937)
They could be pointing to an environment variable or a number of things. I'm not sure if there's a good way for Github to deal with things like that without affecting at least some users.

edit:..I guess they could just validate that it's a key.

Re:SSH Keys on GitHub by benjarrell on Tuesday August 18, 2015 @12:20PM (#10080059)
There probably aren't many, howto and examples come to mind.
Re:SSH Keys on GitHub by jvoorhis on Tuesday August 18, 2015 @12:05PM (#10079933)
Certificates are not secrets.
Re:SSH Keys on GitHub by stephenhuey on Tuesday August 18, 2015 @12:03PM (#10079921)
Amazon does help with it. A friend of mine recently went through a newbie programmer class and forgot the teacher instructed them to keep their AWS SSH keys out of their repo and within a 20-hour period someone racked up tens of thousands of dollars in EC2 charges! Amazon kindly refunded the entire bill.
Re:SSH Keys on GitHub by nightmiles on Tuesday August 18, 2015 @12:23PM (#10080078)
It would be really cool if Github let users know when they are about to do something that is almost certainly a horrible mistake. However, is it their responsibility to stop them? I hope not. They provide a service that does exactly what it says on the box. Github shouldn't be obligated to prevent people from committing files that are otherwise valid and legal.

A better question would be: Could Github be successfully found liable for other users leaving their own keys in a public repository?

Re:SSH Keys on GitHub by ams6110 on Tuesday August 18, 2015 @01:16PM (#10080548)
No, once they start screening content they take on liability. I'm surprised they've done as much as they have e.g. with the "retarded" controversy.
Re:SSH Keys on GitHub by 0x0 on Tuesday August 18, 2015 @02:38PM (#10081221)
I think it would be very useful for repositories to have a default server-side push hook that scans for the most common mistakes, rejecting the push while printing an URL to a page explaining what's going on and with a checkbox for opting out on the check for future pushes to that repo.
Re:SSH Keys on GitHub by sluzorz on Tuesday August 18, 2015 @12:02PM (#10079916)
I don't think they remove it. I do believe that they send an automated email if they detect private keys from being committed to a public repo though. Amazon does something similar to this and they even revoke the key if they see that its public.