id: twitter-api-secret

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

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)(?:twitter)(?:[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: 4b0a00483046022100877b1a3be77ff44aff0bdd19d06ca57b415f273d18c80185e3340b18dcff1460022100c7cff66f293decb72897c1300f57ef7956b1ecc486d729ae81f2588e7a6bddc9:922c64590222798bb761d5b6d8e72950