Skip to content

Commit

Permalink
Update stix_parser.py
Browse files Browse the repository at this point in the history
  • Loading branch information
reuteras committed May 16, 2024
1 parent 6d22010 commit 034e65e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/stix_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,8 @@ def _get_data_sources(self):

techniques_used = []
for techniques_relationship in techniques_used_stix:
technique_description = techniques_relationship.get('description', '')

if 'enterprise-attack' in techniques_relationship['x_mitre_domains']:
technique_stix = self.enterprise_attack.query([Filter('id', '=', techniques_relationship['target_ref'])])
elif 'mobile-attack' in techniques_relationship['x_mitre_domains']:
Expand All @@ -1037,7 +1039,6 @@ def _get_data_sources(self):
technique = technique_stix[0]
ext_refs = technique.get('external_references', [])
technique_name = technique['name']
technique_description = techniques_relationship.get('description', '')
for ext_ref in ext_refs:
if ext_ref['source_name'] == 'mitre-attack':
technique_id = ext_ref['external_id']
Expand Down

0 comments on commit 034e65e

Please sign in to comment.