Skip to content

It is failing to audit the file permissions #1853

@vijaysaladi

Description

@vijaysaladi

Overview

I am using the kube-bench for AKS and running it on OCI OKE. I have provided the config file path as static values in config.yaml file. As of now, Our file config file permissions are set as 744 (for testing). But as per the requirement it should be 644 or more restrictive. But the test results are showing as PASS instead of fail.

[A clear and concise description of what the bug is]

How did you run kube-bench?

Deploying it as pod using the custom docker image that i build with my modified code to audit OCI OKE.

What happened?

The file permissions as showing as

[root@oke-c-1 /]# stat -c %a /var/lib/kubelet/oke_kubelet_conf.json
744
[root@oke-c-1 /]#

But the test results are showing as this.

[PASS] 3.1.1 Ensure that the kubeconfig file permissions are set to 644 or more restrictive (Manual).

What did you expect to happen:

It should fail as the permissions are set as 744.

Environment

[What is your version of kube-bench? (run kube-bench version)]

aks-1.0

[What is your version of Kubernetes? (run kubectl version or oc version on OpenShift.)]

Client Version: v1.31.3
Kustomize Version: v5.4.2
Server Version: v1.31.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions