id: git-credentials-disclosure

info:
  name: Git Credentials - Detect
  author: dhiyaneshDk
  severity: medium
  description: Git credentials were detected.
  reference:
    - https://github.com/detectify/ugly-duckling/blob/master/modules/crowdsourced/git-credentials-disclosure.json
  classification:
    cvss-metrics: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N
    cvss-score: 5.3
    cwe-id: CWE-200
  metadata:
    max-request: 1
  tags: exposure,config

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

    matchers-condition: and
    matchers:
      - type: word
        words:
          - "https://"
          - "@github.com"
        condition: and

      - type: status
        status:
          - 200

      - type: word
        part: header
        words:
          - "text/html"
        negative: true
# digest: 4a0a0047304502205ae1971eca38def1d02f14851a9454802f03898cc534cb62393482cd49c5fd64022100b92047bb4d268b3c26292c92647a3fae2cbd330307d057b4999243b66f9d2f5e:922c64590222798bb761d5b6d8e72950