id: typeform-api-token

info:
  name: Typeform API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/typeform-api-token.go
    - https://github.com/semgrep/semgrep-rules/blob/develop/generic/secrets/gitleaks/typeform-api-token.yaml
  metadata:
    verified: true
    max-request: 1
  tags: typeform,exposure,tokens

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

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