From 90e655d242c2ad468e181ea4bdd49a55f36a76c1 Mon Sep 17 00:00:00 2001
From: VakarisZ <vakarisz@yahoo.com>
Date: Wed, 8 Apr 2020 16:06:02 +0300
Subject: [PATCH] Improved stix2 core import statement

---
 .../cc/services/attack/mitre_api_interface.py              | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

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 af169ec5f..cbe0d911d 100644
--- a/monkey/monkey_island/cc/services/attack/mitre_api_interface.py
+++ b/monkey/monkey_island/cc/services/attack/mitre_api_interface.py
@@ -1,7 +1,6 @@
 from typing import List, Dict
 
-from stix2 import FileSystemSource, Filter, CourseOfAction, AttackPattern
-from stix2.core import STIXDomainObject
+from stix2 import FileSystemSource, Filter, CourseOfAction, AttackPattern, core
 
 
 class MitreApiInterface:
@@ -33,14 +32,14 @@ class MitreApiInterface:
         return all_techniques
 
     @staticmethod
-    def get_stix2_external_reference_id(stix2_data: STIXDomainObject) -> str:
+    def get_stix2_external_reference_id(stix2_data: core.STIXDomainObject) -> str:
         for reference in stix2_data['external_references']:
             if reference['source_name'] == "mitre-attack" and 'external_id' in reference:
                 return reference['external_id']
         return ''
 
     @staticmethod
-    def get_stix2_external_reference_url(stix2_data: STIXDomainObject) -> str:
+    def get_stix2_external_reference_url(stix2_data: core.STIXDomainObject) -> str:
         for reference in stix2_data['external_references']:
             if 'url' in reference:
                 return reference['url']