Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong scan results in aws eks after upgrading from k8s 1.26 to 1.27 #514

Open
fendrifirasleminnov opened this issue Nov 29, 2024 · 0 comments

Comments

@fendrifirasleminnov
Copy link

After doing an upgrade we are starting to see the following errors in cis scan report :

  • "description":"Ensure that the --protect-kernel-defaults argument is set to true (Automated)","remediation":"If using a Kubelet config file, edit the file to set protectKernelDefaults: true.
  • "description":"Ensure that the Anonymous Auth is Not Enabled (Automated)","remediation":"If using a Kubelet config file, edit the file to set authentication: anonymous: enabled to false.
  • "description":"Ensure that the --authorization-mode argument is not set to AlwaysAllow (Automated)","remediation":"If using a Kubelet config file, edit the file to set authorization: mode to Webhook.

After verifiying our cluster config this is the output :

cat /etc/kubernetes/kubelet/kubelet-config.json

{
  "kind": "KubeletConfiguration",
  "apiVersion": "kubelet.config.k8s.io/v1beta1",
  "address": "0.0.0.0",
  "authentication": {
    "anonymous": {
      "enabled": false
    },
    "webhook": {
      "cacheTTL": "2m0s",
      "enabled": true
    },
    "x509": {
      "clientCAFile": "/etc/kubernetes/pki/ca.crt"
    }
  },
  "authorization": {
    "mode": "Webhook",
    "webhook": {
      "cacheAuthorizedTTL": "5m0s",
      "cacheUnauthorizedTTL": "30s"
    }
  },
  "clusterDomain": "cluster.local",
  "hairpinMode": "hairpin-veth",
  "readOnlyPort": 0,
  "cgroupDriver": "systemd",
  "cgroupRoot": "/",
  "featureGates": {
    "RotateKubeletServerCertificate": true,
    "KubeletCredentialProviders": true
  },
  "protectKernelDefaults": true,
  "serializeImagePulls": false,
  "serverTLSBootstrap": true,
  "tlsCipherSuites": [
    "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256",
    "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256",
    "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305",
    "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384",
    "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305",
    "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384",
    "TLS_RSA_WITH_AES_256_GCM_SHA384",
    "TLS_RSA_WITH_AES_128_GCM_SHA256"
  ],
  "clusterDNS": [
    "172.20.0.10"
  ],
  "evictionHard": {
    "memory.available": "100Mi",
    "nodefs.available": "10%",
    "nodefs.inodesFree": "5%"
  },
  "kubeReserved": {
    "cpu": "90m",
    "ephemeral-storage": "1Gi",
    "memory": "893Mi"
  },
  "providerID": "aws:///eu-central-1c/i-0b97a1bacfe797151",
  "systemReservedCgroup": "/system",
  "kubeReservedCgroup": "/runtime"
}

All 3 issues in the report are not correct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant