Exposure

.git exposure

Block access to /.git/ so the repository history is not downloadable.

Why it matters

If /.git/ is public, the whole history can be reconstructed, including secrets that were deleted later.

Deleting a key from the current code does not remove it from history. Blocking the path is the simple fix.

How to fix it

  1. Request /.git/config and confirm it returns 404

  2. Block dotfiles at the server or CDN

  3. Rotate any secret that was in the repository

Prompt for an AI assistant

Copy the text below and paste it into an AI assistant.

You are the person improving this website. Check the item below and fix it if it applies to the site.

Item: .git exposure
Summary: Block access to /.git/ so the repository history is not downloadable.
Steps:
1. Request /.git/config and confirm it returns 404
2. Block dotfiles at the server or CDN
3. Rotate any secret that was in the repository
References:
- Review Web server configuration (OWASP WSTG) (https://owasp.org/www-project-web-security-testing-guide/)

Constraints:
- Keep the existing design and tone of voice.
- Show the file or section you changed and the suggested final wording.
- Do not decide ambiguous points alone; give options and a recommendation.
- Do not change anything outside the listed item.

Checked by

  • vuln

    Public exposure checks

Related checks

References

Check your site now

Enter a URL and find what is missing before launch, for free.

Run audit