id: discord-clientid

info:
  name: Discord Client ID
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/discord-client-id.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/discord-client-id.go
  metadata:
    verified: true
    max-request: 1
  tags: discord,exposure,tokens,clientid,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:discord)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9]{18})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 490a0046304402200d7617885e4e79cbd729f4258c93f0953af00c8703c5008474bc278b7324913502205f6c0659cc34706514855429a439fe53bb76a42130e67842ce00f4848b8410b1:922c64590222798bb761d5b6d8e72950