1
0
mirror of https://github.com/aquasecurity/kube-bench.git synced 2025-01-03 04:10:55 +00:00

Reset audit commands to ps -ef ... closer to benchmark.

This commit is contained in:
Abubakr-Sadik Nii Nai Davis 2017-07-04 15:19:09 +00:00
parent e61dcabdfb
commit e6479afd01
3 changed files with 83 additions and 81 deletions

View File

@ -9,7 +9,7 @@ groups:
checks: checks:
- id: 3.1.1 - id: 3.1.1
text: "Ensure that the --anonymous-auth argument is set to false (Scored)" text: "Ensure that the --anonymous-auth argument is set to false (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--anonymous-auth" - flag: "--anonymous-auth"
@ -23,7 +23,7 @@ groups:
- id: 3.1.2 - id: 3.1.2
text: "Ensure that the --basic-auth-file argument is not set (Scored)" text: "Ensure that the --basic-auth-file argument is not set (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--basic-auth-file" - flag: "--basic-auth-file"
@ -35,7 +35,7 @@ groups:
- id: 3.1.3 - id: 3.1.3
text: "Ensure that the --insecure-allow-any-token argument is not set (Scored)" text: "Ensure that the --insecure-allow-any-token argument is not set (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-allow-any-token" - flag: "--insecure-allow-any-token"
@ -46,7 +46,7 @@ groups:
- id: 3.1.4 - id: 3.1.4
text: "Ensure that the --insecure-bind-address argument is not set (Scored)" text: "Ensure that the --insecure-bind-address argument is not set (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-bind-address" - flag: "--insecure-bind-address"
@ -57,7 +57,7 @@ groups:
- id: 3.1.5 - id: 3.1.5
text: "Ensure that the --insecure-port argument is set to 0 (Scored)" text: "Ensure that the --insecure-port argument is set to 0 (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-port" - flag: "--insecure-port"
@ -71,7 +71,7 @@ groups:
- id: 3.1.6 - id: 3.1.6
text: "Ensure that the --secure-port argument is not set to 0 (Scored)" text: "Ensure that the --secure-port argument is not set to 0 (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
bin_op: or bin_op: or
test_items: test_items:
@ -88,7 +88,7 @@ groups:
- id: 3.1.7 - id: 3.1.7
text: "Ensure that the --profiling argument is set to false (Scored)" text: "Ensure that the --profiling argument is set to false (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--profiling" - flag: "--profiling"
@ -102,7 +102,7 @@ groups:
- id: 3.1.8 - id: 3.1.8
text: "Ensure that the admission control policy is not set to AlwaysAdmit (Scored)" text: "Ensure that the admission control policy is not set to AlwaysAdmit (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -117,7 +117,7 @@ groups:
- id: 3.1.9 - id: 3.1.9
text: "Ensure that the admission control policy is set to NamespaceLifecycle (Scored)" text: "Ensure that the admission control policy is set to NamespaceLifecycle (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "admission-control" - flag: "admission-control"
@ -131,7 +131,7 @@ groups:
- id: 3.1.10 - id: 3.1.10
text: "Ensure that the --audit-log-path argument is set as appropriate (Scored)" text: "Ensure that the --audit-log-path argument is set as appropriate (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-path" - flag: "--audit-log-path"
@ -142,7 +142,7 @@ groups:
- id: 3.1.11 - id: 3.1.11
text: "Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Scored)" text: "Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-maxage" - flag: "--audit-log-maxage"
@ -156,7 +156,7 @@ groups:
- id: 3.1.12 - id: 3.1.12
text: "Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Scored)" text: "Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-maxbackup" - flag: "--audit-log-maxbackup"
@ -170,7 +170,7 @@ groups:
- id: 3.1.13 - id: 3.1.13
text: "Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Scored)" text: "Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-maxsize" - flag: "--audit-log-maxsize"
@ -184,7 +184,7 @@ groups:
- id: 3.1.14 - id: 3.1.14
text: "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Scored)" text: "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--authorization-mode" - flag: "--authorization-mode"
@ -198,7 +198,7 @@ groups:
- id: 3.1.15 - id: 3.1.15
text: "Ensure that the --token-auth-file parameter is not set (Scored)" text: "Ensure that the --token-auth-file parameter is not set (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--token-auth-file" - flag: "--token-auth-file"
@ -210,7 +210,7 @@ groups:
- id: 3.1.16 - id: 3.1.16
text: "Ensure that the --service-account-lookup argument is set to true (Scored)" text: "Ensure that the --service-account-lookup argument is set to true (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--service-account-lookup" - flag: "--service-account-lookup"
@ -224,7 +224,7 @@ groups:
- id: 3.1.17 - id: 3.1.17
text: "Ensure that the --service-account-key-file argument is set as appropriate (Scored)" text: "Ensure that the --service-account-key-file argument is set as appropriate (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--service-account-key-file" - flag: "--service-account-key-file"
@ -235,7 +235,7 @@ groups:
- id: 3.1.18 - id: 3.1.18
text: "Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Scored" text: "Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Scored"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
bin_op: and bin_op: and
test_items: test_items:
@ -252,7 +252,7 @@ groups:
- id: 3.1.19 - id: 3.1.19
text: "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Scored)" text: "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Scored)"
audit: "ps -C federation-apiserver -o cmd --no-headers" audit: "ps -ef | grep federation-apiserver | grep -v grep"
tests: tests:
bin_op: and bin_op: and
test_items: test_items:
@ -271,7 +271,7 @@ groups:
checks: checks:
- id: 3.2.1 - id: 3.2.1
text: "Ensure that the --profiling argument is set to false (Scored)" text: "Ensure that the --profiling argument is set to false (Scored)"
audit: "ps -C federation-controller-manager -o cmd --no-headers" audit: "ps -ef | grep federation-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--profiling" - flag: "--profiling"

View File

@ -9,7 +9,7 @@ groups:
checks: checks:
- id: 1.1.1 - id: 1.1.1
text: "Ensure that the --allow-privileged argument is set to false (Scored)" text: "Ensure that the --allow-privileged argument is set to false (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "allow-privileged" - flag: "allow-privileged"
@ -23,7 +23,7 @@ groups:
- id: 1.1.2 - id: 1.1.2
text: "Ensure that the --anonymous-auth argument is set to false (Scored)" text: "Ensure that the --anonymous-auth argument is set to false (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--anonymous-auth" - flag: "--anonymous-auth"
@ -37,7 +37,7 @@ groups:
- id: 1.1.3 - id: 1.1.3
text: "Ensure that the --basic-auth-file argument is not set (Scored)" text: "Ensure that the --basic-auth-file argument is not set (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--basic-auth-file" - flag: "--basic-auth-file"
@ -50,7 +50,7 @@ groups:
- id: 1.1.4 - id: 1.1.4
text: "Ensure that the --insecure-allow-any-token argument is not set (Scored)" text: "Ensure that the --insecure-allow-any-token argument is not set (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-allow-any-token" - flag: "--insecure-allow-any-token"
@ -61,7 +61,7 @@ groups:
- id: 1.1.5 - id: 1.1.5
text: "Ensure that the --kubelet-https argument is set to true (Scored)" text: "Ensure that the --kubelet-https argument is set to true (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
bin_op: or bin_op: or
test_items: test_items:
@ -78,7 +78,7 @@ groups:
- id: 1.1.6 - id: 1.1.6
text: "Ensure that the --insecure-bind-address argument is not set (Scored)" text: "Ensure that the --insecure-bind-address argument is not set (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-bind-address" - flag: "--insecure-bind-address"
@ -89,7 +89,7 @@ groups:
- id: 1.1.7 - id: 1.1.7
text: "Ensure that the --insecure-port argument is set to 0 (Scored)" text: "Ensure that the --insecure-port argument is set to 0 (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-port" - flag: "--insecure-port"
@ -103,7 +103,7 @@ groups:
- id: 1.1.8 - id: 1.1.8
text: "Ensure that the --secure-port argument is not set to 0 (Scored)" text: "Ensure that the --secure-port argument is not set to 0 (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
bin_op: or bin_op: or
test_items: test_items:
@ -121,7 +121,7 @@ groups:
- id: 1.1.9 - id: 1.1.9
text: "Ensure that the --profiling argument is set to false (Scored)" text: "Ensure that the --profiling argument is set to false (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--profiling" - flag: "--profiling"
@ -135,7 +135,7 @@ groups:
- id: 1.1.10 - id: 1.1.10
text: "Ensure that the --repair-malformed-updates argument is set to false (Scored)" text: "Ensure that the --repair-malformed-updates argument is set to false (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--repair-malformed-updates" - flag: "--repair-malformed-updates"
@ -149,7 +149,7 @@ groups:
- id: 1.1.11 - id: 1.1.11
text: "Ensure that the admission control policy is not set to AlwaysAdmit (Scored)" text: "Ensure that the admission control policy is not set to AlwaysAdmit (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -163,7 +163,7 @@ groups:
- id: 1.1.12 - id: 1.1.12
text: "Ensure that the admission control policy is set to AlwaysPullImages (Scored)" text: "Ensure that the admission control policy is set to AlwaysPullImages (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -177,7 +177,7 @@ groups:
- id: 1.1.13 - id: 1.1.13
text: "Ensure that the admission control policy is set to DenyEscalatingExec (Scored)" text: "Ensure that the admission control policy is set to DenyEscalatingExec (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -191,7 +191,7 @@ groups:
- id: 1.1.14 - id: 1.1.14
text: "Ensure that the admission control policy is set to SecurityContextDeny (Scored)" text: "Ensure that the admission control policy is set to SecurityContextDeny (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -205,7 +205,7 @@ groups:
- id: 1.1.15 - id: 1.1.15
text: "Ensure that the admission control policy is set to NamespaceLifecycle (Scored)" text: "Ensure that the admission control policy is set to NamespaceLifecycle (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "admission-control" - flag: "admission-control"
@ -219,7 +219,7 @@ groups:
- id: 1.1.16 - id: 1.1.16
text: "Ensure that the --audit-log-path argument is set as appropriate (Scored)" text: "Ensure that the --audit-log-path argument is set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-path" - flag: "--audit-log-path"
@ -230,7 +230,7 @@ groups:
- id: 1.1.17 - id: 1.1.17
text: "Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Scored)" text: "Ensure that the --audit-log-maxage argument is set to 30 or as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-maxage" - flag: "--audit-log-maxage"
@ -244,7 +244,7 @@ groups:
- id: 1.1.18 - id: 1.1.18
text: "Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Scored)" text: "Ensure that the --audit-log-maxbackup argument is set to 10 or as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-maxbackup" - flag: "--audit-log-maxbackup"
@ -258,7 +258,7 @@ groups:
- id: 1.1.19 - id: 1.1.19
text: "Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Scored)" text: "Ensure that the --audit-log-maxsize argument is set to 100 or as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--audit-log-maxsize" - flag: "--audit-log-maxsize"
@ -272,7 +272,7 @@ groups:
- id: 1.1.20 - id: 1.1.20
text: "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Scored)" text: "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--authorization-mode" - flag: "--authorization-mode"
@ -286,7 +286,7 @@ groups:
- id: 1.1.21 - id: 1.1.21
text: "Ensure that the --token-auth-file parameter is not set (Scored)" text: "Ensure that the --token-auth-file parameter is not set (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--token-auth-file" - flag: "--token-auth-file"
@ -298,7 +298,7 @@ groups:
- id: 1.1.22 - id: 1.1.22
text: "Ensure that the --kubelet-certificate-authority argument is set as appropriate (Scored)" text: "Ensure that the --kubelet-certificate-authority argument is set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--kubelet-certificate-authority" - flag: "--kubelet-certificate-authority"
@ -311,7 +311,7 @@ groups:
- id: 1.1.23 - id: 1.1.23
text: "Ensure that the --kubelet-client-certificate and --kubelet-clientkey arguments are set as appropriate (Scored)" text: "Ensure that the --kubelet-client-certificate and --kubelet-clientkey arguments are set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
bin_op: and bin_op: and
test_items: test_items:
@ -327,7 +327,7 @@ groups:
- id: 1.1.24 - id: 1.1.24
text: "Ensure that the --service-account-lookup argument is set to true (Scored)" text: "Ensure that the --service-account-lookup argument is set to true (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--service-account-lookup" - flag: "--service-account-lookup"
@ -341,7 +341,7 @@ groups:
- id: 1.1.25 - id: 1.1.25
text: "Ensure that the admission control policy is set to PodSecurityPolicy (Scored)" text: "Ensure that the admission control policy is set to PodSecurityPolicy (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -356,7 +356,7 @@ groups:
- id: 1.1.26 - id: 1.1.26
text: "Ensure that the --service-account-key-file argument is set as appropriate (Scored)" text: "Ensure that the --service-account-key-file argument is set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--service-account-key-file" - flag: "--service-account-key-file"
@ -367,7 +367,7 @@ groups:
- id: 1.1.27 - id: 1.1.27
text: "Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Scored" text: "Ensure that the --etcd-certfile and --etcd-keyfile arguments are set as appropriate (Scored"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
bin_op: and bin_op: and
test_items: test_items:
@ -383,7 +383,7 @@ groups:
- id: 1.1.28 - id: 1.1.28
text: "Ensure that the admission control policy is set to ServiceAccount (Scored)" text: "Ensure that the admission control policy is set to ServiceAccount (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--admission-control" - flag: "--admission-control"
@ -398,7 +398,7 @@ groups:
- id: 1.1.29 - id: 1.1.29
text: "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Scored)" text: "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
bin_op: and bin_op: and
test_items: test_items:
@ -414,7 +414,7 @@ groups:
- id: 1.1.30 - id: 1.1.30
text: "Ensure that the --client-ca-file argument is set as appropriate (Scored)" text: "Ensure that the --client-ca-file argument is set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--client-ca-file" - flag: "--client-ca-file"
@ -426,7 +426,7 @@ groups:
- id: 1.1.31 - id: 1.1.31
text: "Ensure that the --etcd-cafile argument is set as appropriate (Scored)" text: "Ensure that the --etcd-cafile argument is set as appropriate (Scored)"
audit: "ps -C kube-apiserver -o cmd --no-headers" audit: "ps -ef | grep kube-apiserver | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--etcd-cafile" - flag: "--etcd-cafile"
@ -441,7 +441,7 @@ groups:
checks: checks:
- id: 1.2.1 - id: 1.2.1
text: "Ensure that the --profiling argument is set to false (Scored)" text: "Ensure that the --profiling argument is set to false (Scored)"
audit: "ps -C kube-scheduler -o cmd --no-headers" audit: "ps -ef | grep kube-scheduler | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--profiling" - flag: "--profiling"
@ -458,7 +458,7 @@ groups:
checks: checks:
- id: 1.3.1 - id: 1.3.1
text: "Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Scored)" text: "Ensure that the --terminated-pod-gc-threshold argument is set as appropriate (Scored)"
audit: "ps -C kube-controller-manager -o cmd --no-headers" audit: "ps -ef | grep kube-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--terminated-pod-gc-threshold" - flag: "--terminated-pod-gc-threshold"
@ -469,7 +469,7 @@ groups:
- id: 1.3.2 - id: 1.3.2
text: "Ensure that the --profiling argument is set to false (Scored)" text: "Ensure that the --profiling argument is set to false (Scored)"
audit: "ps -C kube-controller-manager -o cmd --no-headers" audit: "ps -ef | grep kube-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--profiling" - flag: "--profiling"
@ -483,7 +483,7 @@ groups:
- id: 1.3.3 - id: 1.3.3
text: "Ensure that the --insecure-experimental-approve-all-kubelet-csrs-for-group argument is not set (Scored)" text: "Ensure that the --insecure-experimental-approve-all-kubelet-csrs-for-group argument is not set (Scored)"
audit: "ps -C kube-controller-manager -o cmd --no-headers" audit: "ps -ef | grep kube-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--insecure-experimental-approve-all-kubelet-csrs-for-group" - flag: "--insecure-experimental-approve-all-kubelet-csrs-for-group"
@ -495,7 +495,7 @@ groups:
- id: 1.3.4 - id: 1.3.4
text: "Ensure that the --use-service-account-credentials argument is set" text: "Ensure that the --use-service-account-credentials argument is set"
audit: "ps -C kube-controller-manager -o cmd --no-headers" audit: "ps -ef | grep kube-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--use-service-account-credentials" - flag: "--use-service-account-credentials"
@ -509,7 +509,7 @@ groups:
- id: 1.3.5 - id: 1.3.5
text: "Ensure that the --service-account-private-key-file argument is set as appropriate (Scored)" text: "Ensure that the --service-account-private-key-file argument is set as appropriate (Scored)"
audit: "ps -C kube-controller-manager -o cmd --no-headers" audit: "ps -ef | grep kube-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--service-account-private-key-file" - flag: "--service-account-private-key-file"
@ -520,7 +520,7 @@ groups:
- id: 1.3.6 - id: 1.3.6
text: "Ensure that the --root-ca-file argument is set as appropriate (Scored)" text: "Ensure that the --root-ca-file argument is set as appropriate (Scored)"
audit: "ps -C kube-controller-manager -o cmd --no-headers" audit: "ps -ef | grep kube-controller-manager | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--root-ca-file" - flag: "--root-ca-file"
@ -644,7 +644,9 @@ groups:
- id: 1.4.11 - id: 1.4.11
text: "Ensure that the etcd data directory permissions are set to 700 or more restrictive (Scored)" text: "Ensure that the etcd data directory permissions are set to 700 or more restrictive (Scored)"
audit: "ps -C etcd -o cmd --no-headers | grep -o data-dir=.* | cut -d= -f2 | xargs stat -c %a" # audit: ps -ef | grep etcd | grep -v grep | sed 's,.*--data-dir=\(.*\)\s*.*,\1,' | xargs stat -c %a
audit: "ps -ef | grep etcd | grep -v grep | grep -o data-dir=.* | cut -d= -f2 | xargs stat -c %a"
# audit: xargs stat -c %a /etc/etcd
tests: tests:
test_items: test_items:
- flag: "700" - flag: "700"
@ -661,7 +663,7 @@ groups:
checks: checks:
- id: 1.5.1 - id: 1.5.1
text: "Ensure that the --cert-file and --key-file arguments are set as appropriate (Scored)" text: "Ensure that the --cert-file and --key-file arguments are set as appropriate (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--cert-file" - flag: "--cert-file"
@ -673,7 +675,7 @@ groups:
- id: 1.5.2 - id: 1.5.2
text: "Ensure that the --client-cert-auth argument is set to true (Scored)" text: "Ensure that the --client-cert-auth argument is set to true (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--client-cert-auth" - flag: "--client-cert-auth"
@ -689,7 +691,7 @@ groups:
- id: 1.5.3 - id: 1.5.3
text: "Ensure that the --auto-tls argument is not set to true (Scored)" text: "Ensure that the --auto-tls argument is not set to true (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
bin_op: or bin_op: or
test_items: test_items:
@ -707,7 +709,7 @@ groups:
- id: 1.5.4 - id: 1.5.4
text: "Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate (Scored)" text: "Ensure that the --peer-cert-file and --peer-key-file arguments are set as appropriate (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--peer-cert-file" - flag: "--peer-cert-file"
@ -722,7 +724,7 @@ groups:
- id: 1.5.5 - id: 1.5.5
text: "Ensure that the --peer-client-cert-auth argument is set to true (Scored)" text: "Ensure that the --peer-client-cert-auth argument is set to true (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--peer-client-cert-auth" - flag: "--peer-client-cert-auth"
@ -740,7 +742,7 @@ groups:
- id: 1.5.6 - id: 1.5.6
text: "Ensure that the --peer-auto-tls argument is not set to true (Scored)" text: "Ensure that the --peer-auto-tls argument is not set to true (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
bin_op: or bin_op: or
test_items: test_items:
@ -761,7 +763,7 @@ groups:
- id: 1.5.7 - id: 1.5.7
text: "Ensure that the --wal-dir argument is set as appropriate (Scored)" text: "Ensure that the --wal-dir argument is set as appropriate (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--wal-dir" - flag: "--wal-dir"
@ -774,7 +776,7 @@ groups:
- id: 1.5.8 - id: 1.5.8
text: "Ensure that the --max-wals argument is set to 0 (Scored)" text: "Ensure that the --max-wals argument is set to 0 (Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--max-wals" - flag: "--max-wals"
@ -790,7 +792,7 @@ groups:
- id: 1.5.9 - id: 1.5.9
text: "Ensure that a unique Certificate Authority is used for etcd (Not Scored)" text: "Ensure that a unique Certificate Authority is used for etcd (Not Scored)"
audit: "ps -C etcd -o cmd --no-headers" audit: "ps -ef | grep etcd | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--trusted-ca-file" - flag: "--trusted-ca-file"

View File

@ -9,7 +9,7 @@ groups:
checks: checks:
- id: 2.1.1 - id: 2.1.1
text: "Ensure that the --allow-privileged argument is set to false (Scored)" text: "Ensure that the --allow-privileged argument is set to false (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--allow-privileged" - flag: "--allow-privileged"
@ -23,7 +23,7 @@ groups:
- id: 2.1.2 - id: 2.1.2
text: "Ensure that the --anonymous-auth argument is set to false (Scored)" text: "Ensure that the --anonymous-auth argument is set to false (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--anonymous-auth" - flag: "--anonymous-auth"
@ -37,7 +37,7 @@ groups:
- id: 2.1.3 - id: 2.1.3
text: "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Scored)" text: "Ensure that the --authorization-mode argument is not set to AlwaysAllow (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--authorization-mode" - flag: "--authorization-mode"
@ -51,7 +51,7 @@ groups:
- id: 2.1.4 - id: 2.1.4
text: "Ensure that the --client-ca-file argument is set as appropriate (Scored)" text: "Ensure that the --client-ca-file argument is set as appropriate (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--client-ca-file" - flag: "--client-ca-file"
@ -63,7 +63,7 @@ groups:
- id: 2.1.5 - id: 2.1.5
text: "Ensure that the --read-only-port argument is set to 0 (Scored)" text: "Ensure that the --read-only-port argument is set to 0 (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--read-only-port" - flag: "--read-only-port"
@ -77,7 +77,7 @@ groups:
- id: 2.1.6 - id: 2.1.6
text: "Ensure that the --streaming-connection-idle-timeout argument is not set to 0 (Scored)" text: "Ensure that the --streaming-connection-idle-timeout argument is not set to 0 (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--streaming-connection-idle-timeout" - flag: "--streaming-connection-idle-timeout"
@ -91,7 +91,7 @@ groups:
- id: 2.1.7 - id: 2.1.7
text: "Ensure that the --protect-kernel-defaults argument is set to true (Scored)" text: "Ensure that the --protect-kernel-defaults argument is set to true (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--protect-kernel-defaults" - flag: "--protect-kernel-defaults"
@ -105,7 +105,7 @@ groups:
- id: 2.1.8 - id: 2.1.8
text: "Ensure that the --make-iptables-util-chains argument is set to true (Scored)" text: "Ensure that the --make-iptables-util-chains argument is set to true (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
bin_op: or bin_op: or
test_items: test_items:
@ -122,7 +122,7 @@ groups:
- id: 2.1.9 - id: 2.1.9
text: "Ensure that the --keep-terminated-pod-volumes argument is set to false (Scored)" text: "Ensure that the --keep-terminated-pod-volumes argument is set to false (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--keep-terminated-pod-volumes" - flag: "--keep-terminated-pod-volumes"
@ -136,7 +136,7 @@ groups:
- id: 2.1.10 - id: 2.1.10
text: "Ensure that the --hostname-override argument is not set (Scored)" text: "Ensure that the --hostname-override argument is not set (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--hostname-override" - flag: "--hostname-override"
@ -147,7 +147,7 @@ groups:
- id: 2.1.11 - id: 2.1.11
text: "Ensure that the --event-qps argument is set to 0 (Scored)" text: "Ensure that the --event-qps argument is set to 0 (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--event-qps" - flag: "--event-qps"
@ -161,7 +161,7 @@ groups:
- id: 2.1.12 - id: 2.1.12
text: "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Scored)" text: "Ensure that the --tls-cert-file and --tls-private-key-file arguments are set as appropriate (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--tls-cert-file" - flag: "--tls-cert-file"
@ -176,7 +176,7 @@ groups:
- id: 2.1.13 - id: 2.1.13
text: "Ensure that the --cadvisor-port argument is set to 0 (Scored)" text: "Ensure that the --cadvisor-port argument is set to 0 (Scored)"
audit: "ps -C kubelet -o cmd --no-headers" audit: "ps -ef | grep kubelet | grep -v grep"
tests: tests:
test_items: test_items:
- flag: "--cadvisor-port" - flag: "--cadvisor-port"