Earlier quoted context omitted.
if you revoke the credentials, removing them from the git history serves no purpose but disrupts everybody that has a clone of the repo. So you're doing harm for little benefit other than covering up the incident. A net loss, if you ask me.
It serves the purpose of removing a hint on your password patterns from public availability. E: Oh, and just to preempt this, even saying "i use only random passwords with no pattern" is useful information, as is having a ballpark password length.
GitHub commit search: “remove password”
71–80 of 266 posts
Re: GitHub commit search: “remove password”
#72If you found a similar mistake in your repository, you can delete commit from history using: `git rebase --onto ^ `. Or if you want actually rewrite it, see git rebase -i` documentation.
A single person who checked out your repo before the force push will still have the credentials. Once this has been pushed to a public repo, assume that the credentials are burned and revoke them.
Re: GitHub commit search: “remove password”
#73reminds me of this: "I don`t know" https://github.com/search?p=1&q=+i+don`t+know&ref=searchresu...
Re: GitHub commit search: “remove password”
#74Earlier quoted context omitted.
They do this for all of their own API keys already. They not only notify you but instantly invalidate a key pushed to a public repo. Annoyingly there is no way to turn it off even when you explicitly want to share an API key knowingly. But i'm more than fine with needing to "obfuscate" an API key or manage secrets correctly knowing it saves TONS of people.
Why would you ever want to share a valid Github API key publicly?
It probably wasn't the best idea, but it was the only "secret" needed in the whole project and I didn't want to maintain a way of managing secrets in a public project for a pointless key.
In the end I did just that, and looking back it was the better choice, but at the time it was annoying.
Re: GitHub commit search: “remove password”
#75Earlier quoted context omitted.
It serves the purpose of removing a hint on your password patterns from public availability. E: Oh, and just to preempt this, even saying "i use only random passwords with no pattern" is useful information, as is having a ballpark password length.
Don't have password patterns, problem solved. Knowing that my password is 20 random characters of all possible symbols will not reduce your search space by any significant amount.
Re: GitHub commit search: “remove password”
#76Earlier quoted context omitted.
A single person who checked out your repo before the force push will still have the credentials. Once this has been pushed to a public repo, assume that the credentials are burned and revoke them.
Indeed; but these actions complement each other.
Re: GitHub commit search: “remove password”
#77Earlier quoted context omitted.
I've gone through the process of open-sourcing previously closed codebases, and in virtually all of them a decision is made to make a single "genesis" commit to start the public exposure because there's just not enough manpower (or I don't know git well enough) to go through and ensure there not only aren't any secrets now (meaning passwords, or info the company doesn't want to release), but also there weren't at any…
Genesis commit, that's a catchy name for it. We've done the same thing, after some discussion this always ends up making the most sense. Also, you can hide your crimes and not show off all your "TODO: put more stuff here" commits to the world.
Re: GitHub commit search: “remove password”
#78Computers are supposed to be good at what imperfect humans are not. This only proves how primitive the tool is. That is, for example, if Gmail can ask "it looks like you forgot the attachment" why can't Git say "this is a public repo and you're about to commit and push passwords. Are you sure?" It's going to be easier to fix the tool than it is to make humans be perfect.
How would git know that it's a password/key/whatever?
Re: GitHub commit search: “remove password”
#79https://github.com/search?p=2&q=remove+password+oops&ref=sea...
Re: GitHub commit search: “remove password”
#80Earlier quoted context omitted.
Don't have password patterns, problem solved. Knowing that my password is 20 random characters of all possible symbols will not reduce your search space by any significant amount.
Still useful, means there's no point in checking any < 20, which halves the search space. Or, on the outside, can be useful to abort any attempts at bruteforce by way of cost evaluation and move on to another target.
Call me selfish, but if my password is known to be too tough to bother, so Eve moves on to someone else's weak password, great.