Skip to content

Commit 161d9c8

Browse files
committed
gis-8503 fix
1 parent f74705e commit 161d9c8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

uncoder-core/app/translator/platforms/splunk/parsers/splunk_alert.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,12 @@ def parse_raw_query(self, text: str, language: str) -> RawQueryContainer:
8787
mitre_attack_container = self.mitre_config.get_mitre_info(
8888
techniques=rule.get("tags", {}).get("mitre_attack_id", [])
8989
)
90+
description = rule.get("description", "")
91+
if rule.get("how_to_implement", ""):
92+
description = f'{description} {rule.get("how_to_implement", "")}'
93+
tags = rule.get("tags", {}).get("analytic_story", [])
94+
if rule.get("type"):
95+
tags.append(rule.get("type"))
9096
return RawQueryContainer(
9197
query=rule.get("search"),
9298
language=language,
@@ -96,9 +102,10 @@ def parse_raw_query(self, text: str, language: str) -> RawQueryContainer:
96102
date=rule.get("date"),
97103
author=rule.get("author").split(", "),
98104
status=rule.get("status"),
99-
description=rule.get("description"),
105+
description=description,
100106
false_positives=rule.get("known_false_positives"),
101107
references=rule.get("references"),
102108
mitre_attack=mitre_attack_container,
109+
tags=tags,
103110
),
104111
)

0 commit comments

Comments
 (0)