pypanther Library Reference
The pypanther
library is in closed beta starting with Panther version 1.108. Please share any bug reports and feature requests with your Panther support team.
pypanther
convenience function reference
pypanther
convenience function referenceConvenience function | How it works |
---|---|
| |
| |
| |
| See Registering |
| |
|
Rule
property reference
Rule
property referenceRequired properties are bolded.
Property | Data type | Overwritten by | Default value | Description/notes |
---|---|---|---|---|
| List[ | |||
| String | Required only for registered rules | ||
|
|
| ||
| Boolean |
| ||
| Non-negative integer |
| ||
| String |
|
| |
| List[String] |
|
| |
| String |
|
| |
| String |
|
| |
| String |
| ||
| Boolean |
| ||
| List[Callable[[PantherEvent], bool]] |
| ||
| List[Callable[[PantherEvent], bool]] |
| ||
| Dictionary[String,List[String]] |
| ||
| List[String] |
| ||
| List[String] |
| ||
| List[ |
| ||
| Positive integer |
|
RuleTest
property reference
RuleTest
property referenceProperty | Data type | Default | Description |
---|---|---|---|
| String | The name of the test case | |
| Boolean | Whether | |
| Dictionary | String | The log event that should be tested against the detection | |
| list[ |
| |
|
|
| The expected severity of the resulting alert |
| String |
| The expected title of the resulting alert |
| String |
| The expected deduplication string of the resulting alert |
| String |
| The expected runbook of the resulting alert |
| String |
| The expected reference of the resulting alert |
| String |
| The expected description of the resulting alert |
| Dictionary |
| The expected alert context of the resulting alert |
RuleMock
property reference
RuleMock
property referenceProperty | Data type | Default | Description |
---|---|---|---|
| String | The variable, attribute, function or method you'd like to mock | |
| Any |
| The new value of |
| Any |
| The new value of |
| Any |
| The name of a different function or method that should be called in place of |
Rule
auxiliary/alerting function reference
Rule
auxiliary/alerting function referenceRequired methods are bolded.
Function | Returned data type | Default value |
---|---|---|
| Boolean | |
|
| Value of |
| String | Value of |
| String | Value of |
| List[String] | Value of |
| String | Value of |
| String | Value of |
| String | Value of |
| Dictionary |
Additional data types
Severity
Severity
pypanther
provides a Severity
class, which contains enums for alert severity. Using Severity
is an alternative to using string literals to denote severity (e.g., "INFO"
or "MEDIUM"
) in a detection. It is recommended to use a Severity
object whenever possible.
Severity
enum reference
Severity
enum referenceINFO
LOW
MEDIUM
HIGH
CRITICAL
Severity
function reference
Severity
function referenceFunction | Returned data type | Description |
---|---|---|
| Integer | Converts a
|
|
| Returns a |
|
| Returns a |
Last updated