id: databricks-token

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

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

    extractors:
      - type: regex
        part: body
        regex:
          - (?i)\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)
# digest: 4a0a0047304502200f2617c00efe0305c460ab83ff5a849c97f2ac15438319a8233585e24a17a25e022100b441377ebe6d9ba08d7b521e1b2f91805771d1d9ccf5bc0f9e9ae957dd175487:922c64590222798bb761d5b6d8e72950