mirror of
https://github.com/aquasecurity/kube-bench.git
synced 2024-11-22 08:08:07 +00:00
a9422a6623
* Overhaul K3s 1.X checks Signed-off-by: Derek Nola <derek.nola@suse.com> * Overhaul K3s 2.X Checks Signed-off-by: Derek Nola <derek.nola@suse.com> * Overhaul K3s 4.X checks Signed-off-by: Derek Nola <derek.nola@suse.com> * Overhaul K3s 5.X checks Signed-off-by: Derek Nola <derek.nola@suse.com> * Add K3s cis-1.8 scan Signed-off-by: Derek Nola <derek.nola@suse.com> * Fix K3s 1.1.10 check Signed-off-by: Derek Nola <derek.nola@suse.com> * Merge journalctl checks for K3s Signed-off-by: Derek Nola <derek.nola@suse.com> * Matched Manual/Automated to correct scoring (false/true) Signed-off-by: Derek Nola <derek.nola@suse.com> * Remove incorrect use of check_for_default_sa.sh script Signed-off-by: Derek Nola <derek.nola@suse.com> --------- Signed-off-by: Derek Nola <derek.nola@suse.com> Co-authored-by: afdesk <work@afdesk.com>
61 lines
2.3 KiB
YAML
61 lines
2.3 KiB
YAML
---
|
|
controls:
|
|
version: "k3s-cis-1.7"
|
|
id: 3
|
|
text: "Control Plane Configuration"
|
|
type: "controlplane"
|
|
groups:
|
|
- id: 3.1
|
|
text: "Authentication and Authorization"
|
|
checks:
|
|
- id: 3.1.1
|
|
text: "Client certificate authentication should not be used for users (Manual)"
|
|
type: "manual"
|
|
remediation: |
|
|
Alternative mechanisms provided by Kubernetes such as the use of OIDC should be
|
|
implemented in place of client certificates.
|
|
scored: false
|
|
- id: 3.1.2
|
|
text: "Service account token authentication should not be used for users (Manual)"
|
|
type: "manual"
|
|
remediation: |
|
|
Alternative mechanisms provided by Kubernetes such as the use of OIDC should be implemented
|
|
in place of service account tokens.
|
|
scored: false
|
|
- id: 3.1.3
|
|
text: "Bootstrap token authentication should not be used for users (Manual)"
|
|
type: "manual"
|
|
remediation: |
|
|
Alternative mechanisms provided by Kubernetes such as the use of OIDC should be implemented
|
|
in place of bootstrap tokens.
|
|
scored: false
|
|
|
|
- id: 3.2
|
|
text: "Logging"
|
|
checks:
|
|
- id: 3.2.1
|
|
text: "Ensure that a minimal audit policy is created (Manual)"
|
|
audit: "journalctl -m -u k3s | grep 'Running kube-apiserver' | tail -n1 | grep 'audit-policy-file'"
|
|
tests:
|
|
test_items:
|
|
- flag: "--audit-policy-file"
|
|
set: true
|
|
remediation: |
|
|
Create an audit policy file for your cluster.
|
|
scored: false
|
|
|
|
- id: 3.2.2
|
|
text: "Ensure that the audit policy covers key security concerns (Manual)"
|
|
type: "manual"
|
|
remediation: |
|
|
Review the audit policy provided for the cluster and ensure that it covers
|
|
at least the following areas,
|
|
- Access to Secrets managed by the cluster. Care should be taken to only
|
|
log Metadata for requests to Secrets, ConfigMaps, and TokenReviews, in
|
|
order to avoid risk of logging sensitive data.
|
|
- Modification of Pod and Deployment objects.
|
|
- Use of `pods/exec`, `pods/portforward`, `pods/proxy` and `services/proxy`.
|
|
For most requests, minimally logging at the Metadata level is recommended
|
|
(the most basic level of logging).
|
|
scored: false
|