Using Exclusion Rules
curl --location --request POST 'https://api.nightfall.ai/v3/scan' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer NF-rEpLaCeM3w1ThYoUrNiGhTfAlLKeY123' \
--header 'Content-Type: application/json' \
--data-raw '{
"policy": {
"detectionRules": [
{
"detectors": [
{
"regex": {
"pattern": "(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))",
"isCaseSensitive": false
},
"exclusionRules": [
{
"wordList": {
"values": [
"4111111111111111",
"5105105105105100"
]
},
"exclusionType": "WORD_LIST",
"matchType": "FULL"
}
],
"minNumFindings": 1,
"minConfidence": "POSSIBLE",
"displayName": "Credit Card Reg Ex",
"detectorType": "REGEX"
}
],
"name": "Credit Card Detection Rule",
"logicalOp": "ALL"
}
]
},
"payload": [
"5105105105105100",
"4111111111111111",
"4012888888881881"
]
}'Last updated
Was this helpful?