-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Current get_enterprise_techniques()
def get_enterprise_techniques(self, skip_revoked_deprecated=True, include_subtechniques=True, enrich_data_sources = False, stix_format=True):
""" Extracts all the available techniques STIX objects in the Enterprise ATT&CK matrix
Args:
skip_revoked_deprecated (bool): default True. Skip revoked and deprecated STIX objects.
include_subtechniques (bool): default True. Include techniques and sub-techniques STIX objects.
enrich_data_sources (bool): default False. Adds data component and data source context to each technqiue.
stix_format (bool): Returns results in original STIX format or friendly syntax (e.g. 'attack-pattern' or 'technique')
Returns:
List of STIX objects
"""
if include_subtechniques:
enterprise_techniques = self.TC_ENTERPRISE_SOURCE.query(Filter("type", "=", "attack-pattern"))
else:
enterprise_techniques = self.TC_ENTERPRISE_SOURCE.query([
Filter("type", "=", "attack-pattern"),
Filter('x_mitre_is_subtechnique', '=', False)
])
if skip_revoked_deprecated:
enterprise_techniques = self.remove_revoked_deprecated(enterprise_techniques)
if enrich_data_sources:
enterprise_techniques = self.enrich_data_sources(enterprise_techniques)
if not stix_format:
enterprise_techniques = self.translate_stix_objects(enterprise_techniques)
return enterprise_techniques
The new parameter to enrich data sources is pointing to a function that does not exist by the name enrich_data_sources
if enrich_data_sources:
enterprise_techniques = self.enrich_data_sources(enterprise_techniques)
That function should be ``enrich_techniques_data_sources`
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working