forked from p34709852/monkey
island: Change 'tab' to 'category' in reverse schema generation
This commit is contained in:
parent
55fcfa9813
commit
b24b8439c5
|
@ -37,14 +37,14 @@ def _crawl_config_schema_properties_for_reverse_schema(schema: Dict, reverse_sch
|
||||||
properties = schema["properties"]
|
properties = schema["properties"]
|
||||||
for prop in properties:
|
for prop in properties:
|
||||||
property_type = properties[prop]["title"]
|
property_type = properties[prop]["title"]
|
||||||
for tab_name in properties[prop]["properties"]:
|
for category_name in properties[prop]["properties"]:
|
||||||
tab = properties[prop]["properties"][tab_name]
|
category = properties[prop]["properties"][category_name]
|
||||||
for config_option_name in tab["properties"]:
|
for config_option_name in category["properties"]:
|
||||||
config_option = tab["properties"][config_option_name]
|
config_option = category["properties"][config_option_name]
|
||||||
for attack_technique in config_option.get("related_attack_techniques", []):
|
for attack_technique in config_option.get("related_attack_techniques", []):
|
||||||
# No config values could be a reason that related attack techniques are left
|
# No config values could be a reason that related attack techniques are left
|
||||||
# unscanned. See https://github.com/guardicore/monkey/issues/1518 for more.
|
# unscanned. See https://github.com/guardicore/monkey/issues/1518 for more.
|
||||||
config_field = f"{config_option['title']} ({tab['title']})"
|
config_field = f"{config_option['title']} ({category['title']})"
|
||||||
_add_config_field_to_reverse_schema(
|
_add_config_field_to_reverse_schema(
|
||||||
property_type, config_field, attack_technique, reverse_schema
|
property_type, config_field, attack_technique, reverse_schema
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue