Hi all, I got an email today from what appears to be an ethical hacker pointing out to public available information that could be used for vulnerability discovery and may be a good idea to limit access to it.
Apparently the current nginx rule to deny acccess to .git directory does not cover all files inside the dir or any of its subdirectories. I checked on the latest git release and rules look the same as our old installation so I'm guessing it still applies.
Sample of available files and folders on our server
Could someone verify this is the case for their installation as well with the latest version?
Thanks!
Apparently the current nginx rule to deny acccess to .git directory does not cover all files inside the dir or any of its subdirectories. I checked on the latest git release and rules look the same as our old installation so I'm guessing it still applies.
location ~ /\.git {
deny all;
}
Sample of available files and folders on our server
https://url/.git/FETCH_HEAD
https://url/.git/HEAD
https://url/.git/config
https://url/.git/logs/HEAD
https://url/.git/logs/refs/remotes/origin/master
https://url/.git/refs/remotes/origin/master
https://url/.gitlab-ci.yml
https://url/.git/index
Could someone verify this is the case for their installation as well with the latest version?
Thanks!