id: twitter-secret-key

info:
  name: Twitter Secret Key
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/praetorian-inc/noseyparker/blob/main/crates/noseyparker/data/default/builtin/rules/twitter.yml
    - https://developer.twitter.com/en/docs/authentication/overview
  metadata:
    verified: true
    max-request: 1
  tags: twitter,exposure,tokens,vuln

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)twitter.?(?:api|app|application|client|consumer|customer|secret|key).?(?:key|oauth|sec|secret)?.{0,2}\s{0,20}.{0,2}\s{0,20}.{0,2}\b([a-z0-9]{35,44})\b
# digest: 4a0a0047304502206eec1ee28f43716d5f33fe9d1449d08beb4a913462edbe62646669c1e3f0cc4f022100be640c9638c2361fb86cceac1e721f72e78634437ff2aa44a0ecd6b5c76b8379:922c64590222798bb761d5b6d8e72950