id: git-logs-exposure

info:
  name: Git Logs Disclosure
  author: NullFuzz
  severity: info
  description: Searches Git Logs files and passed URLs.
  metadata:
    max-request: 1
  tags: logs,git,exposure,vuln

http:
  - method: GET
    path:
      - "{{BaseURL}}/.git/logs/HEAD"

    matchers-condition: and
    matchers:
      - type: dsl
        dsl:
          - "!contains(tolower(body), '<html')"
          - "!contains(tolower(body), '<body')"

      - type: word
        part: header
        words:
          - "application/octet-stream"

      - type: regex
        regex:
          - '^([a-z0-9]+) '

      - type: status
        status:
          - 200
# digest: 4a0a004730450221009d87ac537f327955fb2f81bac1cbaf0c864b20483bed5d4235e0e007d5f1bcb102202c7604532e1e1e0af555597e7c9026a86701fff7a23dad258fafb25d259b2263:922c64590222798bb761d5b6d8e72950