Create custom rule

Create a new natural language security rule that will be applied during scans

Headers

X-ZeroPath-API-Token-IdstringRequired
X-ZeroPath-API-Token-SecretstringRequired

Request

This endpoint expects an object.
namestringRequired
Name for the custom rule
rulestringRequired
Natural language description of the security rule
organizationIdstringOptional
globPatternstringOptionalDefaults to **/*
Glob pattern for files this rule applies to
sourceTypeslist of enumsOptional
Source types this rule applies to
repositoryIdslist of stringsOptional

Specific repository IDs to apply this rule to (if not specified, applies to all)

Response

Rule created successfully
idstring
namestring
rulestring
Natural language description of the security rule
globPatternstring
sourceTypeslist of enums
repositoryIdslist of strings
createdAtdatetime
updatedAtdatetime

Errors