Re:GitHub commit search: “remove password”
by faitswulff on Wednesday February 15, 2017 @07:50AM
(#13651607)
Just note that if it's a public repo, it may not help you, due to attackers scraping Github's API and mirrors like GHTorrent. From "Why Deleting Sensitive Information from Github Doesn't Save You":
http://jordan-wright.com/blog/2014/12/30/why-deleting-sensit...
The top HN comment on the article details their experiences with getting hacked this way:
Re:GitHub commit search: “remove password”
by Flammy on Wednesday February 15, 2017 @01:31PM
(#13654185)
Warning - in the HN comment that is linked, don't click the link, is a browser popup spam which is actually hard to close (url has been dropped and picked up by a spammer?)
Re:GitHub commit search: “remove password”
by seanwilson on Wednesday February 15, 2017 @08:26AM
(#13651808)
Sounds like a better idea to just change the secret.
Re:GitHub commit search: “remove password”
by nkrisc on Wednesday February 15, 2017 @08:34AM
(#13651843)
That is always the best course of action, no? Once it's out, assume it's compromised.
Re:GitHub commit search: “remove password”
by SilasX on Wednesday February 15, 2017 @11:23AM
(#13653111)
But then what do you do when you accidentally commit someone's private medical records or get a "right to be forgotten" order?
Edit: I had similar objections to "why not rework databases as an immutable diff history?" https://news.ycombinator.com/item?id=13581096
Re:GitHub commit search: “remove password”
by tcfunk on Wednesday February 15, 2017 @09:36AM
(#13652245)
Why not both? :)
Re:GitHub commit search: “remove password”
by tonybaroneee on Wednesday February 15, 2017 @09:46AM
(#13652316)
That's time you could be spending on adding a new feature or fixing a bug :) Just change the secret and be done with it!
Re:GitHub commit search: “remove password”
by scaryclam on Wednesday February 15, 2017 @12:09PM
(#13653483)
And when someone new thinks "that password's wrong, it'll update it!"? Do both, gets rid of the issue on both sides and really doesn't take long :)
Re:GitHub commit search: “remove password”
by gkya on Wednesday February 15, 2017 @01:56PM
(#13654399)
Why would they if the tip does not have any passwords in it? It's not like a potential contributor will search the commit log to see if there were once passwords around. Besides, making such changes in public changesets is rude, to say the least.
Re:GitHub commit search: “remove password”
by scaryclam on Wednesday February 15, 2017 @03:22PM
(#13655062)
What I mean is, lots of folks seem to be saying to ignore the presence of the file and just change the password where it's used.
Removing the file, or the password and adding a comment, as well as changing the password where it's used is much less likely to end up with a re-added password later.
Of course, removing the file, adding it to .gitignore and changing the password makes it even harder as a contributor would have to work to add the password back, which is even less likely to happen.
https://rtyley.github.io/bfg-repo-cleaner/