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

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: 4a0a0047304502202f73ba11b1fa81f0cb61d8a1d91508fc26b9c3361a4801dfc069dd43d1ee1466022100ea9382c0520dac380f8ad509a4c56f550ba81df4ac3106160da2c6a5596b139d:922c64590222798bb761d5b6d8e72950