id: dropbox-shortlived-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
  tags: file,keys,dropbox,token

file:
  - extensions:
      - all

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