id: dropbox-short-token

info:
  name: Dropbox Short Lived API Token
  author: DhiyaneshDK
  severity: info
  reference:
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/dropbox-short-lived-api-token.yaml
    - https://github.com/returntocorp/semgrep-rules/blob/develop/generic/secrets/gitleaks/dropbox-short-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}(sl\.[a-z0-9\-=_]{135})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a00473045022022f5d3c9acf0bca05c9b74140feee06edbb26f12f2f9258851319f10854d5b7d022100ae3342dc5dba606754d146629a0e6bf458843c74650ae633390b2107b3adfe4d:922c64590222798bb761d5b6d8e72950