ADT
psengine.risk_rules.risk_rule
¶
RiskRule
¶
Bases: RFBaseModel
Validate data received from the /v2/{entity_type}/riskrules endpoint.
A Recorded Future risk rule is a scoring rule that contributes to the overall risk score of an entity of a given IOC type (ip, domain, hash, url, vulnerability). Each rule has a criticality level (1-3), a human readable label, a description of what it detects, and a count of entities currently matching the rule.
This class supports hashing, equality comparison, string representation, and total ordering
of RiskRule instances.
Hashing
Returns a hash value based on the tuple (name, criticality).
Equality
Two RiskRule instances are equal if they share the same name and criticality.
Greater-than Comparison
A rule is "greater" than another if its criticality is higher. When two rules share the
same criticality, the one whose name sorts later alphabetically is considered greater.
Combined with @total_ordering, this yields most-critical-first when using sorted() in
reverse (or sorted(rules, reverse=True)).
String Representation
Returns a compact one-line summary of the rule.
criticality_label
class-attribute
instance-attribute
¶
model_config
class-attribute
instance-attribute
¶
related_entities
class-attribute
instance-attribute
¶
__hash__
¶
__str__
¶
json
¶
json(
by_alias: bool = True,
exclude_none: bool = True,
auto_exclude_unset: bool = True,
**kwargs,
)
JSON representation of models. It is inherited by every model.
| PARAMETER | DESCRIPTION |
|---|---|
by_alias
|
Alias flag:
TYPE:
|
exclude_none
|
Whether to exclude fields equal to None.
TYPE:
|
auto_exclude_unset
|
Whether to auto exclude values not set.
TYPE:
|