id: dropbox-long-token

info:
  name: Dropbox Long Lived API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/dropbox-long-lived-api-token.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/dropbox-long-lived-api-token.go
  metadata:
    verified: true
    max-request: 1
  tags: dropbox,exposure,tokens,vuln

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

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