id: heroku-api-key

info:
  name: Heroku API Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/heroku.yml
    - https://devcenter.heroku.com/articles/authentication
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    verified: true
    max-request: 1
  tags: heroku,token,exposure,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - '(?i)heroku.{0,20}key.{0,20}\b([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\b'
# digest: 490a0046304402206d3244d5c39eec98c83fb7aeef18c02087c2222d3feda30ddd415b3cc4a817d6022011db7765679c505253952da21667c3008fed7918094a09f8c39b23b2196d1bb9:922c64590222798bb761d5b6d8e72950