SigmaHQ / pySigma-backend-splunk

pySigma Splunk backend
GNU Lesser General Public License v2.1
33 stars 17 forks source link

Added initiliazation and condition to avoid UbuoundLocalError #4

Closed elhoim closed 2 years ago

elhoim commented 2 years ago

When a query is given to be converted and the query does not match one of logsource categories, some variables are not initialized (data_model, data_set and cim_fields) and when trying to output the query string with data_model, there is a python exception UnboundLocalError. Added initilization of those variables and a condition to check. If any of the variable is not initialized, return an empty string.