suricata_check.rule
Wrapper around idstools.rule.Rule for future removal of idstools dependency.
Exceptions
Raised when a rule cannot be parsed by suricata-check. |
Classes
Wrapper around an suricata_check.rule.Rule in preparation for dropping the idstools dependency. |
Functions
|
Parse a rule string using the underlying idstools parser. |
Module Contents
- exception suricata_check.rule.ParsingError(message: str)[source]
Bases:
RuntimeErrorRaised when a rule cannot be parsed by suricata-check.
Most likely, such a rule is also an invalid Suricata rule.
Initializes the ParsingError with the raw rule as message.
- class suricata_check.rule.Rule(inner: idstools.rule.Rule | None)[source]
Wrapper around an suricata_check.rule.Rule in preparation for dropping the idstools dependency.
Create a wrapper around an existing suricata_check.rule.Rule.
Parameters
- inner:
The parsed rule object from suricata_check.rule.parse() or None.
- __getitem__(key: str)[source]
Forward mapping access to the underlying rule.
Raises KeyError when no underlying rule is present.
- get(key: str, default: object | None = None)[source]
Return the value for key if present, otherwise default.
- property inner: idstools.rule.Rule | None
Return the underlying parsed rule object (or None).