mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-07 17:58:52 +00:00
Backend es-dsl tolerates rules without title and log source
This commit is contained in:
parent
16bf5eef0f
commit
cfb4f32651
@ -111,10 +111,14 @@ class ElasticsearchDSLBackend(RulenameCommentMixin, ElasticsearchWildcardHandlin
|
||||
|
||||
def generate(self, sigmaparser):
|
||||
"""Method is called for each sigma rule and receives the parsed rule (SigmaParser)"""
|
||||
self.title = sigmaparser.parsedyaml["title"]
|
||||
self.indices = sigmaparser.get_logsource().index
|
||||
if len(self.indices) == 0:
|
||||
self.title = sigmaparser.parsedyaml.setdefault("title", "")
|
||||
logsource = sigmaparser.get_logsource()
|
||||
if logsource is None:
|
||||
self.indices = None
|
||||
else:
|
||||
self.indices = logsource.index
|
||||
if len(self.indices) == 0:
|
||||
self.indices = None
|
||||
|
||||
try:
|
||||
self.interval = sigmaparser.parsedyaml['detection']['timeframe']
|
||||
|
Loading…
Reference in New Issue
Block a user