def scan_spec_conf(self, conf): keys, values = extract_commands(conf) if "kube-apiserver" in keys and '--kubelet-certificate-authority' not in keys: return CheckResult.FAILED return CheckResult.PASSED
def scan_spec_conf(self, conf): keys, values = extract_commands(conf) if "kube-apiserver" in keys: if '--etcd-ca-file' not in keys: return CheckResult.FAILED return CheckResult.PASSED
def scan_container_conf(self, metadata: Dict[str, Any], conf: Dict[str, Any]) -> CheckResult: keys, values = extract_commands(conf) if "kube-apiserver" in keys and "--kubelet-certificate-authority" not in keys: return CheckResult.FAILED return CheckResult.PASSED
def scan_spec_conf(self, conf): keys, values = extract_commands(conf) if "kube-apiserver" in keys: if "--encryption-provider-config" not in keys: return CheckResult.FAILED return CheckResult.PASSED
def scan_spec_conf(self, conf): keys, values = extract_commands(conf) if "etcd" in keys: if '--peer-cert-file' in keys and '--peer-key-file' in keys: return CheckResult.PASSED return CheckResult.FAILED return CheckResult.PASSED
def scan_container_conf(self, metadata: Dict[str, Any], conf: Dict[str, Any]) -> CheckResult: self.evaluated_container_keys = ["command"] keys, values = extract_commands(conf) if "kube-apiserver" in keys: if "--encryption-provider-config" not in keys: return CheckResult.FAILED return CheckResult.PASSED
def scan_container_conf(self, metadata: Dict[str, Any], conf: Dict[str, Any]) -> CheckResult: self.evaluated_container_keys = ["command"] keys, values = extract_commands(conf) if "etcd" in keys: if "--peer-cert-file" not in keys or "--peer-key-file" not in keys: return CheckResult.FAILED return CheckResult.PASSED
def scan_spec_conf(self, conf): keys, values = extract_commands(conf) if "kubelet" in keys: if '--read-only-port' in keys and values[keys.index( '--read-only-port')] == "0": return CheckResult.PASSED return CheckResult.FAILED return CheckResult.PASSED
def scan_container_conf(self, metadata: Dict[str, Any], conf: Dict[str, Any]) -> CheckResult: self.evaluated_container_keys = ["command"] keys, values = extract_commands(conf) if "kubelet" in keys: if "--read-only-port" in keys and values[keys.index( "--read-only-port")] == "0": return CheckResult.PASSED return CheckResult.FAILED return CheckResult.PASSED