Skip to content

Commit 9b26fab

Browse files
Add deterministic sorting for 'ATT&CK data sources' JSON key (#126)
* Add deterministic sorting for 'ATT&CK data sources' JSON key * Add sorting for DeTT&CT data sources JSON key --------- Co-authored-by: Ruben Bouman <ruben@siriussecurity.nl>
1 parent 1d84138 commit 9b26fab

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

data_source_mapping.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ def _map_and_colorize_techniques(my_ds, systems, exceptions, domain, layer_setti
142142

143143
d['metadata'].append({'name': 'Applicable to', 'value': system['applicable_to']})
144144

145-
app_data_sources = get_applicable_data_sources_technique(
146-
t['data_components'], get_applicable_data_sources_platform(system['platform'], domain))
147-
app_dettect_data_sources = get_applicable_dettect_data_sources_technique(
148-
t['dettect_data_sources'], get_applicable_dettect_data_sources_platform(system['platform'], domain))
145+
app_data_sources = sorted(get_applicable_data_sources_technique(
146+
t['data_components'], get_applicable_data_sources_platform(system['platform'], domain)))
147+
app_dettect_data_sources = sorted(get_applicable_dettect_data_sources_technique(
148+
t['dettect_data_sources'], get_applicable_dettect_data_sources_platform(system['platform'], domain)))
149149

150150
if score > 0:
151151
d['metadata'].append({'name': 'Available data sources', 'value': ', '.join(

0 commit comments

Comments
 (0)