mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-01-03 12:20:54 +00:00
Improve etcd data directory extraction
- If data-dir is not the last argument, the remaining arguments are captured preventing the correct checking. Signed-off-by: Konstantin Semenov <ksemenov@pivotal.io>
This commit is contained in:
parent
be0134de95
commit
8fc6904093
@ -942,7 +942,7 @@ groups:
|
||||
|
||||
- id: 1.4.11
|
||||
text: "Ensure that the etcd data directory permissions are set to 700 or more restrictive (Scored)"
|
||||
audit: ps -ef | grep $etcdbin | grep -v grep | sed 's%.*data-dir[= ]\(\S*\)%\1%' | xargs stat -c %a
|
||||
audit: ps -ef | grep $etcdbin | grep -v grep | sed 's%.*data-dir[= ]\(\S*\)%\1%' | awk '{print $1}' | xargs stat -c %a
|
||||
tests:
|
||||
test_items:
|
||||
- flag: "700"
|
||||
|
Loading…
Reference in New Issue
Block a user