Obviously you shouldn't be storing sensitive information in your codebase (I hope everybody knows that), but the problem here is that you might have been way back when you were prototyping and then moved them out of the codebase . It's really common to start a codebase just by hacking something together with hardcoded secrets. If you have the proper secret segregation now, but you're deploying by doing a git pull, no…
One in every 600 websites has .git exposed
51–60 of 214 posts
Re: One in every 600 websites has .git exposed
#52Related question: Is there any risk to exposing .git if your Git repository is already publicly available (e.g. on GitHub)?
Still - having a real deployment process is much better. It could be as easy as extracting the contents of a tarball generated by git archive.
Re: One in every 600 websites has .git exposed
#53Earlier quoted context omitted.
Probably better to link to the stackoverflow you quite possibly copied this from so that people can see discussion / alternatives, etc: https://serverfault.com/questions/128069/how-do-i-prevent-ap... See also the nginx question: https://stackoverflow.com/questions/2999353/how-do-you-hide-... Note, if you actually did take it from the stackoverflow, you just infringed on someone's copyright; SO's user content is 'crea…
Note, if you actually did take it from the stackoverflow, you just infringed on someone's copyright Does a simple access rule, which I can't see there being many sane ways to express, meet the minimum level of creativity/originality to be eligible for copyright...?
Re: One in every 600 websites has .git exposed
#54Someone on StackOverflow says this will tell nginx not to serve hidden files. location ~ /\. { return 403; } My question - do I need to put this once at the top of my configuration file and all it good or does it need to go into multiple places in the nginx config? It would be great if there was a simple, universal way to say to nginx "don't serve hidden files from anywhere under any circumstances".
[deleted]
# /etc/nginx/deny-dot-files.conf
location ~ /\. {
access_log off;
log_not_found off;
deny all;
}
server {
include /etc/nginx/deny-dot-files.conf;
}Re: One in every 600 websites has .git exposed
#55More precisely, it's "one in every 600 websites examined " Git is popular, but I find it hard to believe that 1/600 of all websites on the Internet use it.
Re: One in every 600 websites has .git exposed
#56It really annoys me randomly hearing about critical security issues through tech news websites - there should be a more systematic way for "non-security professionals" to ensure their sites are protected to best practice levels.
Re: One in every 600 websites has .git exposed
#57Imagine you implement every type of possible security... Keeping your entire server-stack up-to-date, making sure you have SSL, using strong encryption for logging-in, hashing the passwords, making sure your server can only be reached via SSH, adding firewalls, filters, etc. etc. Then some hacker in Eastern Europe comes along (or some beginner at the NSA/GCHQ) and finds out that your .git is exposed and somehow gains…
Don't put secret keys in your repository.
Someone getting a copy of your code should be a big annoyance at worst.
Re: One in every 600 websites has .git exposed
#58Imagine you implement every type of possible security... Keeping your entire server-stack up-to-date, making sure you have SSL, using strong encryption for logging-in, hashing the passwords, making sure your server can only be reached via SSH, adding firewalls, filters, etc. etc. Then some hacker in Eastern Europe comes along (or some beginner at the NSA/GCHQ) and finds out that your .git is exposed and somehow gains…
Re: One in every 600 websites has .git exposed
#59Obviously you shouldn't be storing sensitive information in your codebase (I hope everybody knows that), but the problem here is that you might have been way back when you were prototyping and then moved them out of the codebase . It's really common to start a codebase just by hacking something together with hardcoded secrets. If you have the proper secret segregation now, but you're deploying by doing a git pull, no…
Re: One in every 600 websites has .git exposed
#60In nginx, best to just not serve dot files: location ~ /\. { deny all; access_log off; log_not_found off; }
location ~ /\. { deny all; return 404; }