Fix logsource not a string

This commit is contained in:
frack113
2021-09-27 18:59:05 +02:00
parent a0b48b96d4
commit bcf40fa4e4
3 changed files with 3 additions and 2 deletions
@@ -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
+3
View File
@@ -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)