update
[kconfig-hardened-check.git] / kernel_hardening_checker / engine.py
index b78b1013a2e84b2a2de0b12196b9093cfdc290bc..594563ef63604addf00560c48f522f48855100dc 100644 (file)
@@ -113,7 +113,7 @@ class OptCheck:
         }
         if with_results:
             dump["check_result_text"] = self.result
-            dump["check_result"] = "FAIL" not in self.result
+            dump["check_result"] = self.result.startswith('OK')
         return dump
 
 
@@ -226,9 +226,9 @@ class ComplexOptCheck:
     def json_dump(self, with_results):
         dump = self.opts[0].json_dump(False)
         if with_results:
-            # Add 'result_text' and 'result' keys to the dictionary
+            # Add 'check_result_text' and 'check_result' keys to the dictionary
             dump["check_result_text"] = self.result
-            dump["check_result"] = "FAIL" not in self.result
+            dump["check_result"] = self.result.startswith('OK')
         return dump