From 28a34a4ec98a210c7508ad4801c0559c32a57e34 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Wed, 2 Jun 2021 09:54:46 -0400 Subject: [PATCH] island: Use MONKEY_ISLAND_ABS_PATH to locate STIX attack data --- .../cc/services/attack/mitre_api_interface.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/monkey/monkey_island/cc/services/attack/mitre_api_interface.py b/monkey/monkey_island/cc/services/attack/mitre_api_interface.py index 1a3025233..596f4d498 100644 --- a/monkey/monkey_island/cc/services/attack/mitre_api_interface.py +++ b/monkey/monkey_island/cc/services/attack/mitre_api_interface.py @@ -1,10 +1,15 @@ +import os from typing import Dict, List from stix2 import AttackPattern, CourseOfAction, FileSystemSource, Filter +from monkey_island.cc.server_utils.consts import MONKEY_ISLAND_ABS_PATH + class MitreApiInterface: - ATTACK_DATA_PATH = "monkey_island/cc/services/attack/attack_data/enterprise-attack" + ATTACK_DATA_PATH = os.path.join( + MONKEY_ISLAND_ABS_PATH, "cc", "services", "attack", "attack_data", "enterprise-attack" + ) @staticmethod def get_all_mitigations() -> Dict[str, CourseOfAction]: