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

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: 490a0046304402205d377268ed3b9652c957fa5c66286687c44187a126bce615a5df86e3eb14e7e40220509bd2b000a344069f1617b097103e5345940f01cf3fb02ae8e21564477230fb:922c64590222798bb761d5b6d8e72950