Skip to content

Commit

Permalink
Add deterministic sorting for 'ATT&CK data sources' JSON key (#126)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
alexhaydock and rubinatorz authored Jan 9, 2025
1 parent 1d84138 commit 9b26fab
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions data_source_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ def _map_and_colorize_techniques(my_ds, systems, exceptions, domain, layer_setti

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

app_data_sources = get_applicable_data_sources_technique(
t['data_components'], get_applicable_data_sources_platform(system['platform'], domain))
app_dettect_data_sources = get_applicable_dettect_data_sources_technique(
t['dettect_data_sources'], get_applicable_dettect_data_sources_platform(system['platform'], domain))
app_data_sources = sorted(get_applicable_data_sources_technique(
t['data_components'], get_applicable_data_sources_platform(system['platform'], domain)))
app_dettect_data_sources = sorted(get_applicable_dettect_data_sources_technique(
t['dettect_data_sources'], get_applicable_dettect_data_sources_platform(system['platform'], domain)))

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

0 comments on commit 9b26fab

Please # to comment.