What will happen when you commit secrets to a public Git repo?
61–68 of 68 posts
Re: What will happen when you commit secrets to a public Git repo?
#62AWS uses an `AKIA` prefix for access keys (but none for secrets), SendGrid uses an `SG.` prefix on API keys, etc.
Re: What will happen when you commit secrets to a public Git repo?
#63Earlier quoted context omitted.
I think they meant it would autoinvalidate the tokens which might be valid. I think the math on an AWS secret and access key would be ridiculous to brute force.. but other types of keys might be an interesting attack vector.
If you were guessing valid tokens why would DoSing be more valuable to you than use of the token?
Re: What will happen when you commit secrets to a public Git repo?
#64You'll probably get an email from AWS that your account is compromised and you have 5 days to rotate your keys or your account could be terminated. Then everyday they email you to see if you made any progress rotating the keys. I made this meme about it that my boss didn't find funny. https://imgur.com/ZCUu9rr
I giggled at meme.
[1] https://developer.github.com/partnerships/secret-scanning/
Re: What will happen when you commit secrets to a public Git repo?
#65This would make a good blog post. Maybe they should consider making one so we can have the article [in an easily readable/shareable/updateable form] after it's deleted from Twitter
Re: What will happen when you commit secrets to a public Git repo?
#66Cool experiment! I PM the secret scanning team at GitHub and wanted to mention what GitHub did behind the scenes here. GitHub scans every commit to a public repo for secrets one of our secret scanning partners may have issued. We forward those candidate secrets to the issuing partner, and they take action. In some cases they auto-revoke the secret (AWS normally does this, I believe), in some cases they notify the use…
Do you also scan when a private repo is changed to public?
Re: What will happen when you commit secrets to a public Git repo?
#67I think secret detection is great overall, but the only times I've run into it are false positives with client side API keys that are by their nature public. For example, I recently configured something to use the Google calendar API from JavaScript on the client. It's fully safe to check in this key, since it is intended to be run in client-side JavaScript anyway, but I was still nagged about it.
Re: What will happen when you commit secrets to a public Git repo?
#68I think secret detection is great overall, but the only times I've run into it are false positives with client side API keys that are by their nature public. For example, I recently configured something to use the Google calendar API from JavaScript on the client. It's fully safe to check in this key, since it is intended to be run in client-side JavaScript anyway, but I was still nagged about it.
It's a difficult challenge. Secrets detection is probabilistic, without checking the credentials it's nearly impossible to determine, with 100% accuracy, a true vs a false positive. But it has made big improvements. What detection solutions have you been using?
"GitGuardian has detected the following Google Key exposed within your GitHub account."
My understanding was that they could use an API to check whether it was a real key, but perhaps that doesn't say whether it is a client-side or server-side key?