Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 2980ee4

Browse files
committed
add #46 to changelog, and improve API by making optional arguments optional
1 parent e93ed6a commit 2980ee4

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Changes staged on develop
2+
## Improvements
3+
- Added option to filter mappings by tactic in [technique_mappings_to_csv](technique_mappings_to_csv.py). See pull request [#46](https://github.com/mitre-attack/attack-scripts/pull/46).
4+
15
# v1.5.2 - 2 September 2020
26
## Improvements
37
- Clarified documentation on creation of virtual environments for Windows compatibility.

scripts/technique_mappings_to_csv.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def build_taxii_source(collection_name):
2323
return MemorySource(stix_data=taxii_ds.query())
2424

2525

26-
def get_all_techniques(src, source_name, tactic):
26+
def get_all_techniques(src, source_name, tactic=None):
2727
"""Filters data source by attack-pattern which extracts all ATT&CK Techniques"""
2828
filters = [
2929
Filter("type", "=", "attack-pattern"),
@@ -98,7 +98,7 @@ def arg_parse():
9898
return parser
9999

100100

101-
def do_mapping(ds, fieldnames, relationship_type, type_filter, source_name, sorting_keys, tactic):
101+
def do_mapping(ds, fieldnames, relationship_type, type_filter, source_name, sorting_keys, tactic=None):
102102
"""Main logic to map techniques to mitigations, groups or software"""
103103
all_attack_patterns = get_all_techniques(ds, source_name, tactic)
104104
writable_results = []

0 commit comments

Comments
 (0)