MS365DefenderCountIncidentCategories

Count the categories of alerts in given incident.

python · Microsoft 365 Defender

Details

IDMS365DefenderCountIncidentCategories
Languagepython
From Version5.5.0
Docker Imagedemisto/python3:3.12.13.10404775
Tagstransformer

README

count the categories of alerts in given incident.

Script Data


Name Description
Script Type python3
Tags transformer
Cortex XSOAR Version 5.5.0

Inputs


Argument Name Description
value count the categories of alerts in given incident

Outputs


There are no outputs for this script.

def test_count_dict():
    from MS365DefenderCountIncidentCategories import count_dict

    input_value = "Impact,Malware,Impact,Malware,Impact,InitialAccess"
    expected_output = [
        {"category": "Impact", "count": 3},
        {"category": "Malware", "count": 2},
        {"category": "InitialAccess", "count": 1},
    ]
    assert count_dict(input_value) == expected_output