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

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