File size: 482 Bytes
e3278e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""
This plugin searches for Databricks API token.
"""

import re

from detect_secrets.plugins.base import RegexBasedDetector


class DatabricksApiTokenDetector(RegexBasedDetector):
    """Scans for Databricks API token."""

    @property
    def secret_type(self) -> str:
        return "Databricks API Token"

    @property
    def denylist(self) -> list[re.Pattern]:
        return [
            re.compile(r"""(?i)\b(dapi[a-h0-9]{32})(?:['|\"|\n|\r|\s|\x60|;]|$)"""),
        ]