Silly gits upload private crypto keys to public GitHub projects
Scores of programmers uploaded their private cryptographic keys to public source-code repositories on GitHub, exposing their login credentials to world+dog. The discovery was made just before the website hit the kill switch on its search engine or, more likely, the service collapsed under the weight of curious users trawling for the sensitive data.
The ability to search for private Secure Shell (SSH) keys on the popular open-source code haven came to light yesterday in tweets and other messages on social networks. At least some of the credentials can still be found using Google and other external web crawlers.
GitHub has more than 2 million users but only a minuscule proportion made the daft mistake of uploading their private instead of just their public crypto keys. Private keys reportedly exposed included the SSH login for a major website in China.
The snafu could allow anyone to surreptitiously log into affected developers’ GitHub accounts to alter their projects and gain access to any other online services that use their leaked keys.
The website improved and revamped its search functionality on Wednesday, an improvement that probably enabled the ability to find
Some security watchers commented that GitHub could have prevented users uploading private crypto keys with well-chosen filter – for example blocking public uploads of ~/.ssh/ and ~/.gnupg data – but that doesn’t excuse developers for doing something so silly.
Those exposed by the blunder should replace their compromised keys sooner rather than later. SSH, in simple terms, is typically used to provide encrypted access over the net to accounts on Unix-style operating systems.
A blog post by Sophos on the incident, illustrated by screenshots and private and public SSH keys, can be found here.
GitHub’s status page showed its search functionality was unavailable, implying that this was due to a minor system failure rather than a deliberate move to minimise harm. ®