mirror of
https://github.com/lunchcat/sif.git
synced 2026-01-14 05:46:33 -08:00
40 lines
731 B
YAML
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
|