From 8b8c5f95908f8c27a92cdc47e6d1429de6b5effe Mon Sep 17 00:00:00 2001 From: VakarisZ Date: Wed, 17 Feb 2021 16:20:13 +0200 Subject: [PATCH] Added RuleNameEnum class and a type hint related to it in abstract class --- .../scoutsuite/consts/rule_names/rule_name_enum.py | 5 +++++ .../rule_path_building/abstract_rule_path_creator.py | 7 ++++--- 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 monkey/monkey_island/cc/services/zero_trust/scoutsuite/consts/rule_names/rule_name_enum.py diff --git a/monkey/monkey_island/cc/services/zero_trust/scoutsuite/consts/rule_names/rule_name_enum.py b/monkey/monkey_island/cc/services/zero_trust/scoutsuite/consts/rule_names/rule_name_enum.py new file mode 100644 index 000000000..5ad382c3d --- /dev/null +++ b/monkey/monkey_island/cc/services/zero_trust/scoutsuite/consts/rule_names/rule_name_enum.py @@ -0,0 +1,5 @@ +from enum import Enum + + +class RuleNameEnum(Enum): + pass diff --git a/monkey/monkey_island/cc/services/zero_trust/scoutsuite/data_parsing/rule_path_building/abstract_rule_path_creator.py b/monkey/monkey_island/cc/services/zero_trust/scoutsuite/data_parsing/rule_path_building/abstract_rule_path_creator.py index 7a2b25863..b4767124b 100644 --- a/monkey/monkey_island/cc/services/zero_trust/scoutsuite/data_parsing/rule_path_building/abstract_rule_path_creator.py +++ b/monkey/monkey_island/cc/services/zero_trust/scoutsuite/data_parsing/rule_path_building/abstract_rule_path_creator.py @@ -1,7 +1,8 @@ from abc import ABC, abstractmethod -from enum import Enum, EnumMeta -from typing import List +from enum import Enum +from typing import List, Type +from monkey_island.cc.services.zero_trust.scoutsuite.consts.rule_names.rule_name_enum import RuleNameEnum from monkey_island.cc.services.zero_trust.scoutsuite.consts.service_consts import FINDINGS, SERVICES, SERVICE_TYPES @@ -14,7 +15,7 @@ class AbstractRulePathCreator(ABC): @property @abstractmethod - def supported_rules(self) -> EnumMeta: + def supported_rules(self) -> Type[RuleNameEnum]: pass @classmethod