Skip to content

Commit 94827dd

Browse files
committed
chore: update function names for mitigations
1 parent 36ec811 commit 94827dd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

modules/mitigations/mitigations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def generate_mitigations():
3535
if domain["deprecated"]:
3636
continue
3737
# Reads the STIX and creates a list of the ATT&CK mitigations
38-
mitigations[domain["name"]] = util.stixhelpers.get_mitigation_list(ms[domain["name"]])
39-
mitigations_with_deprecated[domain["name"]] = util.stixhelpers.get_mitigation_list(
38+
mitigations[domain["name"]] = util.stixhelpers.get_mitigation_list_from_src(ms[domain["name"]])
39+
mitigations_with_deprecated[domain["name"]] = util.stixhelpers.get_mitigation_list_from_src(
4040
src=ms[domain["name"]], get_deprecated=True
4141
)
4242

modules/util/stixhelpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from . import relationshiphelpers as rsh
1515

1616

17-
def get_mitigation_list(src, get_deprecated=False):
17+
def get_mitigation_list_from_src(src, get_deprecated=False):
1818
"""Read the STIX and return a list of all mitigations in the STIX."""
1919
mitigations = src.query([stix2.Filter("type", "=", "course-of-action"), stix2.Filter("revoked", "=", False)])
2020

@@ -24,7 +24,7 @@ def get_mitigation_list(src, get_deprecated=False):
2424

2525
return sorted(mitigations, key=lambda k: k["name"].lower())
2626

27-
def get_detection_strategy_list(src, get_deprecated=False):
27+
def get_detection_strategy_list_from_src(src, get_deprecated=False):
2828
"""Read the STIX and return a list of all mitigations in the STIX."""
2929
detectionstrategies = src.query([stix2.Filter("type", "=", "x-mitre-detection-strategy")])
3030
if not get_deprecated:

0 commit comments

Comments
 (0)