X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kernel_hardening_checker%2Fengine.py;h=519070857abb92667e85e09b199b17002d2afaaf;hb=74963559e760568c1d4b11e4c120e792efd428e4;hp=1d75251b1393730060a842772f11acfaff4113f4;hpb=a110fbc7a8e2000e0b634aaad0627b71bc0bbdc4;p=kconfig-hardened-check.git diff --git a/kernel_hardening_checker/engine.py b/kernel_hardening_checker/engine.py index 1d75251..5190708 100644 --- a/kernel_hardening_checker/engine.py +++ b/kernel_hardening_checker/engine.py @@ -112,8 +112,8 @@ class OptCheck: "reason": self.reason, } if with_results: - dump["check_result_text"] = self.result - dump["check_result"] = "FAIL" not in self.result + dump["check_result"] = self.result + dump["check_result_bool"] = 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 'check_result_text' and 'check_result' keys to the dictionary - dump["check_result_text"] = self.result - dump["check_result"] = self.result.startswith('OK') + # Add the 'check_result' and 'check_result_bool' keys to the dictionary + dump["check_result"] = self.result + dump["check_result_bool"] = self.result.startswith('OK') return dump