id: dockercfg-config

info:
  name: Detect .dockercfg
  author: geeknik
  severity: high
  description: Docker registry authentication data
  metadata:
    max-request: 2
  tags: docker,exposure,config

http:
  - method: GET
    path:
      - "{{BaseURL}}/.dockercfg"
      - "{{BaseURL}}/.docker/config.json"

    matchers-condition: and
    matchers:
      - type: word
        words:
          - '"email":'
          - '"auth":'
        condition: and

      - type: word
        part: header
        words:
          - "text/plain"

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