Create a Custom Secret Detector

Lets you create a secret detector.

POST/csapi/v1.3/secreDetector/create

Input ParametersInput Parameters

Parameter Mandatory/Optional Data Type Description
category Mandatory string Specify category in which you want to create a secret detector.
regex Mandatory BASE64 encoded value Specify the encoded regex of the secret detector that you want to create.
The valid encoding format - Base 64 (ISO-8859-1 Character Set)
secretDetector Mandatory string Specify name of the secret detector.
severity Mandatory string Specify the severity.
The valid values are: low, medium, high, and critical.
secretRuleStatus Mandatory string Specify the status.
The valid values are "active" and "inactive". 
type
 
Mandatory string Specify type of the secret detector. 
The valid values is: custom
keywords Optional string Specify keywords related to the secret detector.

Sample: Create a Secret DetectorSample: Create a Secret Detector

API Request

curl -X "POST"
"<qualys_base_url>/csapi/v1.3/secretDetector/create"
-H "accept: application/json"
-H "Content-Type: application/json"
-d "{
  "category": "PublicKey",
  "keywords": [
    "SD"
  ],
  "regex": "KD9pKSg/UDxrZXk+bWVzc2FnZWJpcmRbYS16MC05XyAuXFwtLF17MCwyNX0pKD18Pnw6PXxcXHxcXHw6fDw9fD0+fDopLnswLDV9WydcXFwiXSg/UDxzZWNyZXQ+W2EtaDAtOV17OH0tW2EtaDAtOV17NH0tW2EtaDAtOV17NH0tW2EtaDAtOV17NH0tW2EtaDAtOV17MTJ9KVsnXFxcIl0=",
  "secretDetector": "SD1",
  "severity": "HIGH",
  "secretRuleStatus": "Active",
  "type": "custom"
}"

Response

{
  "Created secret rule: ": "ad9383d7-a66e-4932-9780-5939755b416a"
}