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

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