News for hackers. Stuff that matters.
Re:GitHub commit search: “remove password” by lutefisk on Wednesday February 15, 2017 @08:40AM (#13651876)
At my work one of my coworkers accidentally put a secret token in a GitHub issue. Couple hours later he got an email from the sysadmin at the parent company saying his token finding script went off. He probably wouldn't have noticed for a long while if that script wasn't running.
Re:GitHub commit search: “remove password” by manarth on Wednesday February 15, 2017 @09:33AM (#13652232)
Wouldn't the token-finding script be even more of a risk?

If the token is XYZ and the script is searching https://github.com/search?utf8=%E2%9C%93&q=XYZ&type=Commits&...:

1. It's sharing the token with GitHub.

2. It's embedding the token as query-string parameter in a GET request, which is much more likely to be logged (than sending it as data in a POST request), and more likely to be available to less-privileged/less-trusted staff.

3. If the request is sent to a non-HTTPS endpoint, the query can be MITMd, revealing the token.

I'd be very wary of setting up a token-finding script, it feels like it adds more risk than it saves.

Re:GitHub commit search: “remove password” by obsurveyor on Wednesday February 15, 2017 @09:37AM (#13652253)
You can scrape the issues without exposing the token. You could probably do it by just subscribing to all of them and parsing emails. No one(especially in security) should be using a third party search to match sensitive data. It's like searching Google for your social security number.
Re:GitHub commit search: “remove password” by lutefisk on Wednesday February 15, 2017 @09:37AM (#13652250)
It was a pattern based script, all the tokens had the same length.
Re:GitHub commit search: “remove password” by arjie on Wednesday February 15, 2017 @09:58AM (#13652406)
You just search that some token was uploaded by your people, not specifically yours.
Re:GitHub commit search: “remove password” by Keverw on Wednesday February 15, 2017 @10:09AM (#13652471)
Maybe they search the tokens public key and not the token itself. Then if the public key is found, then they download the repo and do scanning for the private key.
Re:GitHub commit search: “remove password” by deathanatos on Wednesday February 15, 2017 @12:12PM (#13653521)
A group at BigCorp Inc. was sharing a tool they'd written to ThirdParty Ltd. As part of this, they transferred documentation, including how to configure the tool. Including an example. With a real AWS key. For a dev too, so the key had no restrictions.