mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-12-18 12:48:08 +00:00
make the kubelet cafile test posix compliant (#643)
This commit is contained in:
parent
66692951c8
commit
2a325bd60d
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user