id: discord-clientsecret

info:
  name: Discord Client Secret
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/discord-client-secret.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/discord-client-secret.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}([a-z0-9=_\-]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 490a0046304402202da2b9284d0da4b25219af0e7d4d14a5861e48e284ed735ce8a28fae482ee68b02204950fae17c4ef16e3721d70fce6b71ba1636d4bdea77c9093d944586c102a46c:922c64590222798bb761d5b6d8e72950