id: rapidapi-access-token

info:
  name: RapidAPI Access Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/rapidapi-access-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/rapidapi-access-token.yaml
  classification:
    cwe-id: CWE-522,CWE-540
  metadata:
    max-request: 1
    verified: true
  tags: exposure,token,rapidapi,vuln

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

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