suricata_check.utils.checker_typing
The suricata_check.typing module contains all types used by the suricata-check package.
Exceptions
Raised when an invalid rule is detected. |
Classes
The Issue dataclass represents a single issue found in a rule. |
|
The OutputSummary dataclass represent the suricata_check, consisting of rule reports and summaries. |
|
The OutputSummary dataclass represent a collection of summaries on the output of suricata_check. |
|
The RuleReport dataclass represents a rule, together with information on its location and detected issues. |
Functions
|
Returns all class types that subclass the provided type. |
Module Contents
- exception suricata_check.utils.checker_typing.InvalidRuleError(message: str)[source]
Bases:
RuntimeError
Raised when an invalid rule is detected.
Note that some rules may be invalid due to not following the Suricata rule syntax. Rules following the syntax, but considered invalid by Suricata due to missing options need not raise this error. Rules for which this error is not raised are not neccessarily syntactically correct but can be processed by suricata-check.
Initializes the InvalidRuleError with the raw rule as message.
- class suricata_check.utils.checker_typing.Issue[source]
The Issue dataclass represents a single issue found in a rule.
- class suricata_check.utils.checker_typing.OutputReport(rules: RULE_REPORTS_TYPE = [], summary: OutputSummary | None = None)[source]
The OutputSummary dataclass represent the suricata_check, consisting of rule reports and summaries.
Initialized the OutputReport, optionally with a list of rules and/or a summary.
- add_rule(rule_report: RuleReport) None [source]
Adds an rule to the report.
- property rules: RULE_REPORTS_TYPE
List of rules contained in the report.
- class suricata_check.utils.checker_typing.OutputSummary[source]
The OutputSummary dataclass represent a collection of summaries on the output of suricata_check.
- class suricata_check.utils.checker_typing.RuleReport[source]
The RuleReport dataclass represents a rule, together with information on its location and detected issues.
- property issues: ISSUES_TYPE
List of issues found in the rule.
- suricata_check.utils.checker_typing.get_all_subclasses(cls: type[Cls]) collections.abc.Iterable[type[Cls]] [source]
Returns all class types that subclass the provided type.