This is a DLP detector that you can easily use or extend upon in the Nightfall platform.
Description | Detects a database connection string, an expression that contains the parameters required for the applications to connect to a database server. Supports most popular databases. |
---|---|
Detector type | AI Model (Entity Detection) |
Category | Secrets |
Region | Global |
Tags | secrets database |
Enum (for using this detector via the API) |
DATABASE_CONNECTION_STRING
|
curl --request POST \
--url https://api.nightfall.ai/v3/scan \
--header 'Accept: application/json' \
--header 'Authorization: Bearer REPLACE-WITH-YOUR-KEY' \
--header 'Content-Type: application/json' \
--data '
{
"policy": {
"detectionRules": [
{
"detectors": [
{
"minNumFindings": 1,
"minConfidence": "LIKELY",
"displayName": "Database Connection String",
"detectorType": "NIGHTFALL_DETECTOR",
"nightfallDetector": "DATABASE_CONNECTION_STRING"
} ],
"name": "My Inline Detection Rule",
"logicalOp": "ANY"
}
]
},
"payload": [
"INSERT 1+ PAYLOAD(S)",
"INSERT 1+ PAYLOAD(S)"
]
}
'
import requests
import json
api_key = "REPLACE-WITH-YOUR-KEY"
url = "https://api.nightfall.ai/v3/scan"
headers = {
"Accept": "application/json",
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
payload = {
"policy": {
"detectionRules": [
{
"detectors": [
{
"minNumFindings": 1,
"minConfidence": "LIKELY",
"displayName": "Database Connection String",
"detectorType": "NIGHTFALL_DETECTOR",
"nightfallDetector": "DATABASE_CONNECTION_STRING"
}
],
"name": "My Inline Detection Rule",
"logicalOp": "ANY"
}
]
},
"payload": [
"INSERT 1+ PAYLOAD(S)",
"INSERT 1+ PAYLOAD(S)"
]
}
response = requests.post(url, headers=headers, data=json.dumps(payload))
print(response.status_code)
print(response.json())
Input any text to validate or test. The default minimum confidence is set to "Possible".