Skip to content

Commit

Permalink
added query override
Browse files Browse the repository at this point in the history
  • Loading branch information
WildDogOne committed Aug 25, 2024
1 parent b692f89 commit 08920b7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/droid/platforms/ms_xdr.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,20 @@ def create_rule(self, rule_content, rule_converted, rule_file):
self.logger.error(e)

if "custom" in rule_content:
if "query_period" in rule_content["custom"]:
query_period = rule_content["custom"]["query_period"].upper()
if query_period in [
"0",
"1H",
"3H",
"12H",
"24H",
]:
alert_rule["schedule"]["period"] = query_period
else:
self.logger.error(
f"Sigma Query Period must be one of '0', '1H', '3H', '12H' or '24H', used value provided in the config {self._query_period} - {rule_file}"
)
if "actions" in rule_content["custom"]:
responseActions = self.parse_actions(
rule_content["custom"]["actions"], rule_file=rule_file
Expand Down Expand Up @@ -533,6 +547,7 @@ def parse_impactedAssets(self, impactedAssets, rule_file=None):
"initiatingProcessAccountObjectId",
"initiatingProcessAccountSid",
"initiatingProcessAccountUpn",
"targetAccountUpn",
],
}
# Check if the action_name is in the valid_identifiers dictionary
Expand Down

0 comments on commit 08920b7

Please sign in to comment.