Re:Please stop serving .git to the outside world
by tokenizerrr on Monday June 10, 2013 @09:08AM
(#5854044)
Why would it contain passwords?
[ Parent
| on HN ]
Re:Please stop serving .git to the outside world
by DigitalJack on Monday June 10, 2013 @09:14AM
(#5854077)
Naive users have left passwords in by mistake, only to make another mistake in thinking a commit takes care of it.
Re:Please stop serving .git to the outside world
by krapp on Monday June 10, 2013 @10:54AM
(#5854799)
I've done this, accidentally published my livejournal passwords on a project. Now I make certain that at the very least I have a folder covered by .gitignore in my local repo that contains any auth tokens or whatnot and I double check the history before pushing it anywhere.
Some people are naïve. All people make mistakes. And many people are naïve about whether they make mistakes.
Re:Please stop serving .git to the outside world
by beaumartinez on Monday June 10, 2013 @09:16AM
(#5854086)
Well, it could contain OAuth tokens for external services (eg Twitter), as well as secret tokens (used in Rails, Django for cookies).
Worse still, they could be using passwords in an external service (eg, for a database) and have included those as well.
Re:Please stop serving .git to the outside world
by stouset on Monday June 10, 2013 @10:41AM
(#5854684)
Stop putting shit like this in your repo. Developers should not have access to credentials that make their way onto production.
Re:Please stop serving .git to the outside world
by beaumartinez on Monday June 10, 2013 @11:33AM
(#5855066)
So how else should they handle them? Assuming the repo is private, keeping keys in the repo is the most frictionless way to ensure everyone has everything set up correctly.
Environment variables get annoying quickly if you ever need different ones for different projects, and if you create a shell script (or Vagrantfile) to do it for you, you're still keeping the keys in the repo.
Re:Please stop serving .git to the outside world
by marshray on Monday June 10, 2013 @10:46PM
(#5859301)
> Assuming the repo is private
Git is designed to facilitate sharing. Repos are a poor tool for managing secrets, especially intermixed with a general software project.
Use something else for secrets. Ideally you would generate the secret on the same server on which it will be used and not move it over the network (except for a one-off backup).
Re:Please stop serving .git to the outside world
by dllthomas on Monday June 10, 2013 @10:40PM
(#5859267)
Put them in deployment-specific configuration files.
Re:Please stop serving .git to the outside world
by andrewflnr on Monday June 10, 2013 @07:40PM
(#5858366)
Granted, that stuff shouldn't be in the repo, but some of us are both dev and ops, or just working on our personal site. Chill out.
Re:Please stop serving .git to the outside world
by orng on Monday June 10, 2013 @09:17AM
(#5854093)
//TODO replace password and username with user input
password = "johnsmithAdminpass1234"
username = "johnsmith01"
login(username, password)
If your test-DB is the same as your live one and username and password are real admin passwords, then you are in trouble. It's horrible and you shouldn't do this, but it happens.Edit: formatting
Re:Please stop serving .git to the outside world
by dllthomas on Monday June 10, 2013 @10:40PM
(#5859269)
Fortunately, it can be fixed just by changing your passwords, which you should do from time to time anyway.
Re:Please stop serving .git to the outside world
by lucaspiller on Monday June 10, 2013 @09:14AM
(#5854073)
The history could. If you ever stored passwords in Git, even if you have now removed them, they would still be in the history.