RuleDto

RuleDto
RuleDto

A Rule (Built-in or Custom).

JSON Example
{
    "ruleId": 0,
    "name": "string",
    "description": "string",
    "ruleType": "string",
    "matchData": "string",
    "action": "string",
    "ruleRank": "string",
    "minAgentVersion": "string",
    "guid": "string",
    "isEnabled": false,
    "isBuiltIn": false,
    "revision": 0,
    "createdBy": 0,
    "updatedBy": 0,
    "policyCount": 0,
    "createdAt": "string",
    "updatedAt": "string"
}
integer As int64 As int64
ruleId
Required  

Identifier of the rule, never changed. A Custom Rule gets it from the Console (CUSTOM_LOCAL 1 to 999,999, CUSTOM_GLOBAL 1,000,000 to 9,999,999); a Built-in Rule gets it from its Rule Pack (VIRTUAL_PATCHING 10,000,000 to 99,999,999, DEFAULT_ATTACK and UNSPECIFIED 100,000,000 to 999,999,999)

string
name
Required  

A Custom Rule's name is stored trimmed and differs from every other Rule's name ignoring case

string
description
Optional

Free text; a Custom Rule's text is stored trimmed, at most 2,000 characters, and a whitespace-only text is stored as an empty string. Null when none was given

string
ruleType
Required  

Rule type code, the key of a rule type catalog entry: PATH_FILE_CMD, HASH, PUBLISHER_SIGNING, MFA, ANTI_TAMPER or VIB_REPUTATION in this release; further codes are added by new releases; fixed when the rule is created

string
matchData
Optional

JSON-encoded rule match criteria. Null for built-in system rules to prevent detection evasion.

action
Required  

Default verdict of a Rule. MFA_REQUIRED is accepted only for ruleType MFA (any other type is refused with 400 INVALID_RULE_ACTION).

  • ALLOW: The operation is permitted
  • BLOCK: The operation is aborted with -EPERM
  • AUDIT: The operation is logged and alerted, and execution is permitted
  • MFA_REQUIRED: Triggers an interactive TOTP challenge through PAM; accepted only for ruleType MFA
Enumeration: ALLOW, BLOCK, AUDIT, MFA_REQUIRED
ruleRank
Required  

Evaluation rank: CUSTOM_LOCAL (custom rules) first, then CUSTOM_GLOBAL (SHA-256 rules created from the file catalog), then VIRTUAL_PATCHING, then DEFAULT_ATTACK. It decides the order rules are sent to the agent, ahead of Policy stack rank and sequence.

  • UNSPECIFIED: Built-in Rules from a Rule Pack whose vendor rank is unset
  • CUSTOM_LOCAL: Custom rules created on the Rules page; the default for a Custom Rule and the highest priority. Rule ids 1 to 999,999
  • CUSTOM_GLOBAL: Custom SHA-256 rules created from the file catalog, evaluated after CUSTOM_LOCAL. Rule ids 1,000,000 to 9,999,999
  • VIRTUAL_PATCHING: Built-in Rules from a Rule Pack, evaluated after CUSTOM_GLOBAL. Rule ids 10,000,000 to 99,999,999
  • DEFAULT_ATTACK: Built-in Rules from a Rule Pack, evaluated last. Rule ids 100,000,000 to 999,999,999
Enumeration: UNSPECIFIED, CUSTOM_LOCAL, CUSTOM_GLOBAL, VIRTUAL_PATCHING, DEFAULT_ATTACK
string
minAgentVersion
Required  

Never admin-supplied: stamped from the rule type's catalog baseline or a Rule Pack's metadata

string As uuid As uuid
guid
Required  

Generated once on first insert; read-only, for correlation with the agent's rule header

boolean
isEnabled
Required  

Whether the rule is enabled. A new Custom Rule starts enabled; a Built-in Rule is always enabled and cannot be disabled

boolean
isBuiltIn
Required  

True for a rule installed from a Rule Pack, false for a rule created through the API. A Built-in Rule cannot be edited or deleted

integer As int32 As int32
revision
Required  

Starts at 1 and grows by 1 each time the rule's content or enabled state changes; a Rule Pack update or retirement of a Built-in Rule also advances it

integer As int64 As int64
createdBy
Optional

Identifier of the user who created the rule, or for a Built-in Rule of the administrator who installed its pack. Null when no user is recorded, as for a rule installed by the first-boot system install

integer As int64 As int64
updatedBy
Optional

Identifier of the user who last changed the rule (edit, enable or disable, Rule Pack update or retirement). Null when no user is recorded

integer As int64 As int64
policyCount
Required  

Number of Policies the Rule is attached to

string As date-time As date-time
createdAt
Required  

When the rule was created, as an ISO 8601 date-time with offset; never changes

string As date-time As date-time
updatedAt
Required  

When the rule was last updated, as an ISO 8601 date-time with offset