diff --git a/cfg/cis-1.3/node.yaml b/cfg/cis-1.3/node.yaml index 0cd83e862585220042d79beda4e8aea032516a6d..ede4bcc4ac7b387dce27b21df8095101a3a69088 100644 --- a/cfg/cis-1.3/node.yaml +++ b/cfg/cis-1.3/node.yaml @@ -458,9 +458,7 @@ groups: text: Ensure that the client certificate authorities file ownership is set to root:root (Scored) audit: | CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}') - if [[ -z $CAFILE ]]; then - CAFILE=$kubeletcafile - fi + if test -z $CAFILE; then CAFILE=$kubeletcafile; fi if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi tests: test_items: diff --git a/cfg/cis-1.4/node.yaml b/cfg/cis-1.4/node.yaml index 8b7161b2fc565437ec78bcf9e971cb4fef131a6d..cad30b7225995af5e41e36ffc8331932f2e30757 100644 --- a/cfg/cis-1.4/node.yaml +++ b/cfg/cis-1.4/node.yaml @@ -449,9 +449,7 @@ groups: text: Ensure that the client certificate authorities file ownership is set to root:root (Scored) audit: | CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}') - if [[ -z $CAFILE ]]; then - CAFILE=$kubeletcafile - fi + if test -z $CAFILE; then CAFILE=$kubeletcafile; fi if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi tests: test_items: diff --git a/cfg/cis-1.5/node.yaml b/cfg/cis-1.5/node.yaml index bdf0ffc28e6e1f66795cfd23f0c492a88cf25a48..e70daf5a07935f0dd7ef804ad3c6ac20f543b2dd 100644 --- a/cfg/cis-1.5/node.yaml +++ b/cfg/cis-1.5/node.yaml @@ -119,9 +119,7 @@ groups: text: "Ensure that the client certificate authorities file ownership is set to root:root (Scored)" audit: | CAFILE=$(ps -ef | grep kubelet | grep -v apiserver | grep -- --client-ca-file= | awk -F '--client-ca-file=' '{print $2}' | awk '{print $1}') - if [[ -z $CAFILE ]]; then - CAFILE=$kubeletcafile - fi + if test -z $CAFILE; then CAFILE=$kubeletcafile; fi if test -e $CAFILE; then stat -c %U:%G $CAFILE; fi tests: test_items: