(src, source_name, tactic=None)
return remove_deprecated(results)
Filters data source by attack-pattern which extracts all ATT&CK Techniques
Filters data source by attack-pattern which extracts all ATT&CK Techniques
Filters data source by attack - pattern which extracts all ATT&CK Techniques
def get_all_techniques(src, source_name, tactic=None):
    """Filters data source by attack-pattern which extracts all ATT&CK Techniques"""
    filters = [
        Filter("type", "=", "attack-pattern"),
        Filter("external_references.source_name", "=", source_name),
    ]
    if tactic:
        filters.append(Filter('kill_chain_phases.phase_name', '=', tactic))

    results = src.query(filters)
    return remove_deprecated(results)
def get_all_techniques ( src , source_name , tactic = None ) : filters = [ Filter ( "type" , "=" , "attack-pattern" ) , Filter ( "external_references.source_name" , "=" , source_name ) , ] if tactic : filters . append ( Filter ( 'kill_chain_phases.phase_name' , '=' , tactic ) ) results = src . query ( filters ) return remove_deprecated ( results )