Skip to content

Commit

Permalink
update-taxonomy: handle sigma scenarios that have no proper classific…
Browse files Browse the repository at this point in the history
…ation (#1193)

* update-taxonomy: handle sigma scenarios that have no proper classification

* Update taxonomy

---------

Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
blotus and actions-user authored Dec 17, 2024
1 parent 1e3c9c9 commit 2f868a7
Show file tree
Hide file tree
Showing 2 changed files with 5,734 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/scenario_taxonomy.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def get_mitre_tactic_from_technique(technique, mitre_data):
def get_mitre_techniques_from_label(labels, mitre_data):
ret = list()
errors = list()
if "classification" not in labels:
if "classification" not in labels or not labels["classification"]:
return ret, errors

for classification in labels["classification"]:
Expand All @@ -133,7 +133,7 @@ def get_mitre_techniques_from_label(labels, mitre_data):
def get_cwe_from_label(labels):
ret = list()
errors = list()
if "classification" not in labels:
if "classification" not in labels or not labels["classification"]:
return ret, errors

for classification in labels["classification"]:
Expand All @@ -153,7 +153,7 @@ def get_cwe_from_label(labels):
def get_cve_from_label(labels):
ret = list()
errors = list()
if "classification" not in labels:
if "classification" not in labels or not labels["classification"]:
return ret, errors

for classification in labels["classification"]:
Expand Down
Loading

0 comments on commit 2f868a7

Please sign in to comment.