Skip to content

Commit

Permalink
Refactor to follow XSOAR Guidelines
Browse files Browse the repository at this point in the history
It also adds tests to the commands implemented.
  • Loading branch information
figarrido committed Jul 7, 2023
1 parent a2f5bad commit 3363d5a
Show file tree
Hide file tree
Showing 30 changed files with 4,789 additions and 1,264 deletions.
364 changes: 171 additions & 193 deletions Packs/ZeroFox/Classifiers/classifier-ZeroFox_Mapping.json
Original file line number Diff line number Diff line change
@@ -1,194 +1,172 @@
{
"brands": null,
"cacheVersn": 0,
"defaultIncidentType": "",
"definitionId": "",
"description": "",
"feed": false,
"fromServerVersion": "",
"id": "ea399f75-4639-468f-8641-75cfc7b30593",
"incidentSamples": null,
"indicatorSamples": null,
"instanceIds": null,
"itemVersion": "",
"keyTypeMap": {},
"locked": false,
"logicalVersion": 9,
"mapping": {
"dbot_classification_incident_type_all": {
"dontMapEventToLabels": true,
"internalMapping": {
"Additional Data": {
"simple": "metadata"
},
"Alert Category": {
"simple": "alert_type"
},
"Alert ID": {
"simple": "id"
},
"Alert Source": {
"simple": "network"
},
"Event Type": {
"simple": "alert_type"
},
"External Status": {
"simple": "status"
},
"Rule Name": {
"complex": {
"filters": [],
"root": "rule_name",
"transformers": []
}
},
"Tags": {
"complex": {
"filters": [],
"root": "tags",
"transformers": [
{
"args": {
"separator": {
"value": {
"simple": ","
}
}
},
"operator": "join"
}
]
}
},
"Threat Name": {
"simple": "rule_name"
},
"URLs": {
"simple": "offending_content_url"
},
"dbotMirrorDirection": {
"simple": "mirror_direction"
},
"dbotMirrorId": {
"simple": "id"
},
"dbotMirrorInstance": {
"simple": "mirror_instance"
},
"details": {
"simple": "notes"
},
"occurred": {
"complex": {
"filters": [],
"root": "timestamp",
"transformers": []
}
},
"severity": {
"complex": {
"filters": [],
"root": "severity",
"transformers": [
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "informational"
}
},
"toReplace": {
"value": {
"simple": "1"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "low"
}
},
"toReplace": {
"value": {
"simple": "2"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "medium"
}
},
"toReplace": {
"value": {
"simple": "3"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "high"
}
},
"toReplace": {
"value": {
"simple": "4"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "critical"
}
},
"toReplace": {
"value": {
"simple": "5"
}
}
},
"operator": "replace"
}
]
}
}
}
}
},
"name": "ZeroFox Mapping",
"nameRaw": "ZeroFox Mapping",
"packID": "",
"packName": "",
"propagationLabels": [
"all"
],
"sourceClassifierId": "",
"system": false,
"toServerVersion": "",
"transformer": {},
"type": "mapping-incoming",
"unclassifiedCases": null,
"version": -1
}
"description": "",
"feed": false,
"id": "ZeroFox Mapping",
"mapping": {
"dbot_classification_incident_type_all": {
"dontMapEventToLabels": true,
"internalMapping": {
"Additional Data": {
"simple": "metadata"
},
"Alert Category": {
"simple": "alert_type"
},
"Alert ID": {
"simple": "id"
},
"Alert Source": {
"simple": "network"
},
"Event Type": {
"simple": "alert_type"
},
"External Status": {
"simple": "status"
},
"Rule Name": {
"complex": {
"filters": [],
"root": "rule_name",
"transformers": []
}
},
"Tags": {
"complex": {
"filters": [],
"root": "tags",
"transformers": [
{
"args": {
"separator": {
"value": {
"simple": ","
}
}
},
"operator": "join"
}
]
}
},
"Threat Name": {
"simple": "rule_name"
},
"URLs": {
"simple": "offending_content_url"
},
"dbotMirrorDirection": {
"simple": "mirror_direction"
},
"dbotMirrorId": {
"simple": "id"
},
"dbotMirrorInstance": {
"simple": "mirror_instance"
},
"details": {
"simple": "notes"
},
"occurred": {
"complex": {
"filters": [],
"root": "timestamp",
"transformers": []
}
},
"severity": {
"complex": {
"filters": [],
"root": "severity",
"transformers": [
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "informational"
}
},
"toReplace": {
"value": {
"simple": "1"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "low"
}
},
"toReplace": {
"value": {
"simple": "2"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "medium"
}
},
"toReplace": {
"value": {
"simple": "3"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "high"
}
},
"toReplace": {
"value": {
"simple": "4"
}
}
},
"operator": "replace"
},
{
"args": {
"limit": {},
"replaceWith": {
"value": {
"simple": "critical"
}
},
"toReplace": {
"value": {
"simple": "5"
}
}
},
"operator": "replace"
}
]
}
}
}
}
},
"name": "ZeroFox Mapping",
"type": "mapping-incoming",
"version": -1,
"fromVersion": "6.8.0"
}
Loading

0 comments on commit 3363d5a

Please sign in to comment.