VT-0412 from a scan of our demo app
Git repository is publicly downloadable at /.git/
Evidence
$ curl -si https://demo.vulnticket.com/.git/HEAD
HTTP/2 200
content-type: application/octet-stream
ref: refs/heads/main
Why it matters
Anyone can download your full source code and its history, including any credentials that were ever committed. Off-the-shelf tools do this in one command.
How to reproduce
- Run the
curlcommand above. - A
200response containingref:means the repository is exposed.
How to fix
Block the path on the web server, stop deploying .git into the web root, then rotate
every secret that was ever in the repository.
location ~ /\.git { return 404; }
AI-fix prompt
Our production server exposes the .git directory at https://demo.vulnticket.com/.git/. Update the nginx config in this repo so any path starting with /.git returns 404, change the deploy so .git is never copied into the web root, and add a smoke check that GET /.git/HEAD returns 404.