@@ -146,20 +146,18 @@ def analyze_data(
146146 except re .error :
147147 self ._log_event (
148148 category = EventCategory .RUNTIME ,
149- description = "KernelModule regex is invalid" ,
149+ description = f "KernelModule regex is invalid. Regex: { args . regex_filter } " ,
150150 data = {"regex_filters" : {args .regex_filter }},
151151 priority = EventPriority .ERROR ,
152152 )
153- self .result .message = (
154- f"Kernel modules failed to match regex. Regex: { args .regex_filter } "
155- )
153+ self .result .message = "Kernel modules failed to match regex"
156154 self .result .status = ExecutionStatus .ERROR
157155 return self .result
158156
159157 if unmatched_pattern :
160158 self ._log_event (
161159 category = EventCategory .RUNTIME ,
162- description = "KernelModules did not match all patterns" ,
160+ description = f "KernelModules did not match all patterns. Unmatched patterns: { unmatched_pattern } " ,
163161 data = {"unmatched_pattern: " : unmatched_pattern },
164162 priority = EventPriority .INFO ,
165163 )
@@ -184,23 +182,23 @@ def analyze_data(
184182 if not filtered_modules and not_matched :
185183 self ._log_event (
186184 category = EventCategory .RUNTIME ,
187- description = "KernelModules: no modules matched" ,
185+ description = f "KernelModules: no modules matched. Not matched: { not_matched } " ,
188186 data = args .kernel_modules ,
189187 priority = EventPriority .ERROR ,
190188 )
191- self .result .message = f"Kernel modules not matched: { not_matched } "
189+ self .result .message = f"Kernel modules not matched. Not matched : { not_matched } "
192190 self .result .status = ExecutionStatus .ERROR
193191 return self .result
194192 # some modules matched
195193 elif filtered_modules and not_matched :
196194
197195 self ._log_event (
198196 category = EventCategory .RUNTIME ,
199- description = "KernelModules: not all modules matched" ,
197+ description = f "KernelModules: not all modules matched. Not matched: { not_matched } " ,
200198 data = not_matched ,
201199 priority = EventPriority .ERROR ,
202200 )
203- self .result .message = f"Kernel modules not matched: { not_matched } "
201+ self .result .message = f"Kernel modules not matched. Not matched : { not_matched } "
204202 self .result .status = ExecutionStatus .ERROR
205203 return self .result
206204 else :
0 commit comments