id: mailgun-api-token

info:
  name: Mailgun API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/mailgun.yml
    - https://documentation.mailgun.com/en/latest/api-intro.html#authentication-1
  metadata:
    verified: true
    max-request: 1
  tags: mailgun,token,exposure

http:
  - method: GET
    path:
      - "{{BaseURL}}"

    extractors:
      - type: regex
        part: body
        regex:
          - '(?i)(?:mailgun|mg).{0,20}key-([a-z0-9]{32})\b'
# digest: 490a00463044022068a5545da1e0adf6eabc2354654e93daef0f1e047e5e51248870f85dc1372a0b02200ea8e7c4147f9f02489bca1b9d30d35e99f557512de010f2d6a9f95aa018302d:922c64590222798bb761d5b6d8e72950