mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-06 17:35:19 +00:00
es-rule: make risk scores stable
Don't create unnecessary deltas between runs.
This commit is contained in:
parent
a08571be91
commit
92fcc314bf
@ -1283,13 +1283,13 @@ class ElasticSearchRuleBackend(ElasticsearchQuerystringBackend):
|
||||
|
||||
def map_risk_score(self, level):
|
||||
if level == "low":
|
||||
return randrange(0,22)
|
||||
return 5
|
||||
elif level == "medium":
|
||||
return randrange(22,48)
|
||||
return 35
|
||||
elif level == "high":
|
||||
return randrange(48,74)
|
||||
return 65
|
||||
elif level == "critical":
|
||||
return randrange(74,101)
|
||||
return 95
|
||||
|
||||
def create_rule(self, configs, index):
|
||||
tags = configs.get("tags", [])
|
||||
|
Loading…
Reference in New Issue
Block a user