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
  metadata:
    max-request: 1
    verified: true
  tags: exposure,token,rapidapi

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: 4b0a00483046022100b36786551d4ce6e570d9b07fe2b3f17e0544fc2382a0e92e9734e2ef1dca3d1f0221008d5b615cf819fcce214a7ad00d41320f9064f907d1918ea637c47db40dbfb73b:922c64590222798bb761d5b6d8e72950