http://www.fcc.gov/.git/config FCC has a github account. http://www.fcc.gov/.git/logs/HEAD
Please stop serving .git to the outside world
51–60 of 91 posts
Re: Please stop serving .git to the outside world
#52OK, so I knew about this one before. But if you didn't, there's a better solution than just remembering it, which seems to be the gist of this post. Solution: run one or more automated security tools across your sites, before deploying them to public locations. If possible, automate this process, so it happens all the time . The tools won't catch everything, but they will catch something you didn't, some of the time.…
Can you recommend a couple of good automated security tools?
Re: Please stop serving .git to the outside world
#53Earlier quoted context omitted.
> Being one configuration directive away from embarrassing failure is not a good idea. I can't stop but thinking about PHP webapps, for instance Wordpress serves wp-index.php in the same directory as wp-config.php, indeed only one configuration directive away from blowing it all up in your face. Every few months or so I encounter a huge site that serves me PHP source code. For instance the BBC: http://www.bbc.co.uk/r…
Why in the world would anyone serve a php file as .xml? That seems to be the problem... xml files are meant to be readable as text.
Dumb, but it's the only thing I can come up with offhand.
Re: Please stop serving .git to the outside world
#54Re: Please stop serving .git to the outside world
#55I'm running a (very small) personal site on lighttpd, and updating it via git. I checked my.server.com/.git/config - and was duly served the config file. Eek!
So I edited my /var/www/lighttpd/lighttpd.conf file, and added the following lines: $HTTP["url"] =~ ".git" { url.access-deny = ("") }
and (I have used [asterisk] for the symbol, here, as otherwise it rendered my text italic)
$HTTP["host"] =~ "(.[asterisk])" { url.redirect = ( "^/.git(.*)" => "%1/nope.html" ) }
And restarted the server.
But my.server.com/.git/config still served up the config file. What am I missing?
Re: Please stop serving .git to the outside world
#56This is too much of blanket statement. As long as there's nothing secret in the repository, serving up .git is perfectly fine. Both http://codemirror.net and http://ternjs.net (projects by me) have websites that are simply checkouts of the projects' repositories. Which were already public.
This is pretty much a blanket statement for any project of reasonable size (or even with just a sole clueless developer). But don't take my word for it, check the evidence first hand by poking around the list for yourself :) The solution is so effortless that it seems indefensible to serve .git, when the risk of doing so is a fleeting moment of forgetfulness leading to your site and databases getting pwned. Kind of l…
Re: Please stop serving .git to the outside world
#57I feel incredible stupid asking this, but...how? I'm running a (very small) personal site on lighttpd, and updating it via git. I checked my.server.com/.git/config - and was duly served the config file. Eek! So I edited my /var/www/lighttpd/lighttpd.conf file, and added the following lines: $HTTP["url"] =~ ".git" { url.access-deny = ("") } and (I have used [asterisk] for the symbol, here, as otherwise it rendered my…
Re: Please stop serving .git to the outside world
#58Re: Please stop serving .git to the outside world
#59I feel incredible stupid asking this, but...how? I'm running a (very small) personal site on lighttpd, and updating it via git. I checked my.server.com/.git/config - and was duly served the config file. Eek! So I edited my /var/www/lighttpd/lighttpd.conf file, and added the following lines: $HTTP["url"] =~ ".git" { url.access-deny = ("") } and (I have used [asterisk] for the symbol, here, as otherwise it rendered my…
Problem solved with two commands and you can also add additional stuff to your repository like sources before they went through different processors (coffee script, SASS,...) or various drafts. This way you also have a full copy of everything you need for your site in case something happens to your workstation.
Re: Please stop serving .git to the outside world
#60If you use Apache, you can add the following to prevent the .svn directories from being served: \.svn."> Order allow,deny Deny from all </LocationMatch