Fix logsource not a string
This commit is contained in:
@@ -13,7 +13,6 @@ tags:
|
||||
logsource:
|
||||
product: windows
|
||||
service: security
|
||||
definition:
|
||||
detection:
|
||||
selection:
|
||||
EventID: 4648
|
||||
|
||||
@@ -15,7 +15,6 @@ tags:
|
||||
logsource:
|
||||
product: windows
|
||||
service: security
|
||||
definition:
|
||||
detection:
|
||||
selection:
|
||||
EventID: 4674
|
||||
|
||||
@@ -613,6 +613,9 @@ class TestRules(unittest.TestCase):
|
||||
if key.lower() not in valid_logsource:
|
||||
print(Fore.RED + "Rule {} has a logsource with an invalid field ({})".format(file, key))
|
||||
valid = False
|
||||
elif not isinstance(logsource[key],str):
|
||||
print(Fore.RED + "Rule {} has a logsource with an invalid field type ({})".format(file, key))
|
||||
valid = False
|
||||
if not valid:
|
||||
faulty_rules.append(file)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user