mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2025-02-19 19:12:12 +00:00
Rancher checks correction (#1563)
1. Have modified test criteria such that it produces right output in case of there is no file exists. 2. Have modified the tests wherever root:root is checked multiple times.
This commit is contained in:
parent
faeceb5dfa
commit
2374e7b07f
@ -149,9 +149,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -118,9 +118,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -114,9 +114,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -111,9 +111,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -94,27 +94,27 @@ groups:
|
|||||||
|
|
||||||
- id: 4.1.7
|
- id: 4.1.7
|
||||||
text: "Ensure that the certificate authorities file permissions are set to 600 or more restrictive (Automated)"
|
text: "Ensure that the certificate authorities file permissions are set to 600 or more restrictive (Automated)"
|
||||||
audit: "stat -c permissions=%a /node/etc/kubernetes/ssl/kube-ca.pem"
|
audit: '/bin/sh -c "if test -e /node/etc/kubernetes/ssl/kube-ca.pem; then stat -c permissions=%a /node/etc/kubernetes/ssl/kube-ca.pem; else echo \"File not found\"; fi"'
|
||||||
tests:
|
tests:
|
||||||
|
bin_op: or
|
||||||
test_items:
|
test_items:
|
||||||
- flag: "permissions"
|
- flag: "permissions"
|
||||||
compare:
|
compare:
|
||||||
op: bitmask
|
op: bitmask
|
||||||
value: "600"
|
value: "600"
|
||||||
|
- flag: "File not found"
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the file permissions of the
|
Run the following command to modify the file permissions of the
|
||||||
--client-ca-file chmod 600 <filename>
|
--client-ca-file chmod 600 <filename>
|
||||||
scored: true
|
scored: true
|
||||||
|
|
||||||
- id: 4.1.8
|
- id: 4.1.8
|
||||||
text: "Ensure that the client certificate authorities file ownership is set to root:root (Automated)"
|
text: "Ensure that the client certificate authorities file ownership is set to root:root (Automated)"
|
||||||
audit: "stat -c %U:%G /node/etc/kubernetes/ssl/kube-ca.pem"
|
audit: '/bin/sh -c "if test -e /node/etc/kubernetes/ssl/kube-ca.pem; then stat -c %U:%G /node/etc/kubernetes/ssl/kube-ca.pem; else echo \"File not found\"; fi"'
|
||||||
tests:
|
tests:
|
||||||
|
bin_op: or
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
- flag: "File not found"
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -116,9 +116,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -119,9 +119,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -119,9 +119,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
@ -120,9 +120,6 @@ groups:
|
|||||||
tests:
|
tests:
|
||||||
test_items:
|
test_items:
|
||||||
- flag: root:root
|
- flag: root:root
|
||||||
compare:
|
|
||||||
op: eq
|
|
||||||
value: root:root
|
|
||||||
remediation: |
|
remediation: |
|
||||||
Run the following command to modify the ownership of the --client-ca-file.
|
Run the following command to modify the ownership of the --client-ca-file.
|
||||||
chown root:root <filename>
|
chown root:root <filename>
|
||||||
|
Loading…
Reference in New Issue
Block a user