Git deposu üst verisi herkese açık okunabiliyor
GET https://www.acme-shop.example/.git/config
→ GET /.git/config HTTP/1.1 Host: www.acme-shop.example User-Agent: TrustpectScanner/1.0 (+https://trustpect.com/security) ← HTTP/1.1 200 OK Content-Type: text/plain [core] repositoryformatversion = 0 [remote "origin"] url = https://•••• maskeli@git.example/acme/shop.git ✓ doğrulandı · gövde git config imzasıyla eşleşiyor
# /etc/nginx/sites-enabled/acme-shop.conf location ~ /\.(git|svn|hg) { deny all; return 404; }
# .htaccess veya vhost RedirectMatch 404 /\.git <DirectoryMatch "/\.git"> Require all denied </DirectoryMatch>
# Security → WAF → Custom rule Expression: (http.request.uri.path contains "/.git") Action: Block
// express.static(...) öncesine app.use(/\/\.git/, (req, res) => res.sendStatus(404));