Files
sif/modules/recon/git-exposed.yaml
2026-01-03 05:57:10 -08:00

40 lines
731 B
YAML

# Exposed Git Repository Detection Module
id: git-exposed
info:
name: Exposed Git Repository
author: sif
severity: high
description: Detects exposed .git directories that may leak source code
tags: [git, exposure, source-code, misconfiguration]
type: http
http:
method: GET
paths:
- "{{BaseURL}}/.git/HEAD"
- "{{BaseURL}}/.git/config"
- "{{BaseURL}}/.git/index"
matchers:
- type: word
part: body
words:
- "ref: refs/"
- "[core]"
- "repositoryformatversion"
condition: or
- type: status
status:
- 200
extractors:
- type: regex
name: git_branch
part: body
regex:
- "ref: refs/heads/(.+)"
group: 1