suricata_check.utils.checker_typing
The suricata_check.typing module contains all types used by the suricata-check package.
Attributes
Type representing a dictionary-like object mapping a string to a SIMPLE_SUMMARY_TYPE. |
|
Type representing a sequence of multiple Issue instances. |
|
Type representing a sequence of multiple RuleReport instances. |
|
Type representing a dictionary-like object mapping a string to a number of issues. |
|
Type representing a dictionary-like object mapping a string to a number of issues. |
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. |
Module Contents
- exception suricata_check.utils.checker_typing.InvalidRuleError(message: str)[source]
Bases:
RuntimeErrorRaised 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.
- summary: OutputSummary | None = None
- class suricata_check.utils.checker_typing.OutputSummary[source]
The OutputSummary dataclass represent a collection of summaries on the output of suricata_check.
- issues_by_group: SIMPLE_SUMMARY_TYPE
- issues_by_type: EXTENSIVE_SUMMARY_TYPE
- overall_summary: SIMPLE_SUMMARY_TYPE
- 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.EXTENSIVE_SUMMARY_TYPE
Type representing a dictionary-like object mapping a string to a SIMPLE_SUMMARY_TYPE.
- suricata_check.utils.checker_typing.ISSUES_TYPE
Type representing a sequence of multiple Issue instances.
- suricata_check.utils.checker_typing.RULE_REPORTS_TYPE
Type representing a sequence of multiple RuleReport instances.
- suricata_check.utils.checker_typing.RULE_SUMMARY_TYPE
Type representing a dictionary-like object mapping a string to a number of issues.
- suricata_check.utils.checker_typing.SIMPLE_SUMMARY_TYPE
Type representing a dictionary-like object mapping a string to a number of issues.