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 string Specify the regex of the secret detector that you want to create.
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": "ad92nbj10",
  "secretDetector": "SD1",
  "severity": "HIGH",
  "secretRuleStatus": "Active",
  "type": "custom"
}"

Response

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