suricata_check.checkers.interface ================================= .. py:module:: suricata_check.checkers.interface .. autoapi-nested-parse:: The `suricata_check.checkers.interface` modules contains the interfaces implemented by checkers. Implementation of the `CheckerInterface` is neccessary for checker auto-discovery. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/suricata_check/checkers/interface/checker/index /autoapi/suricata_check/checkers/interface/dummy/index Classes ------- .. autoapisummary:: suricata_check.checkers.interface.CheckerInterface suricata_check.checkers.interface.DummyChecker Package Contents ---------------- .. py:class:: CheckerInterface(include: Optional[collections.abc.Iterable[str]] = None) Interface for rule checkers returning a list of issues. These checkers are automatically discovered through `suricata_check.suricata_check.get_checkers()`. Each code should start with an upper case letter (may be multiple), followed by three digits. In other words, each code should follow the following regex `[A-Z]{1,}[0-9]{3}` We recommend using a letter to indicate the category of the issue, such as described in `README.md`. Moreover, we suggest to reserve certain ranges of numbers for each checker. Initializes the checker given a list of issue codes to emit. .. py:method:: check_rule(rule: idstools.rule.Rule) -> suricata_check.utils.checker_typing.ISSUES_TYPE Checks a rule and returns a list of issues found. .. py:attribute:: codes :type: collections.abc.Mapping[str, collections.abc.Mapping[str, int]] A Mapping of issue codes emitted by the checker to metadata for those issue types. The metadata is structured in the form of a Mapping from attribute name to attribute value. The one mandatory metadata attribute is severity, which must be one of the levels provided by the `logging` module .. py:attribute:: enabled_by_default :type: bool :value: True A boolean indicating if the checker is enabled by default when discovered automatically. .. py:class:: DummyChecker(include: Optional[collections.abc.Iterable[str]] = None) Bases: :py:obj:`suricata_check.checkers.interface.checker.CheckerInterface` Dummy class to prevent runtime errors on import. Log an error due to failed imports for the checker. .. py:attribute:: codes A Mapping of issue codes emitted by the checker to metadata for those issue types. The metadata is structured in the form of a Mapping from attribute name to attribute value. The one mandatory metadata attribute is severity, which must be one of the levels provided by the `logging` module .. py:attribute:: enabled_by_default :value: False A boolean indicating if the checker is enabled by default when discovered automatically.