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,vuln

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