nuclei-templates/cloud/kubernetes/security-compliance/k8s-enc-prov-conf.yaml

42 lines
1.6 KiB
YAML

id: k8s-enc-prov-conf
info:
name: Ensure that encryption providers are configured
author: princechaddha
severity: medium
description: Checks if encryption providers are appropriately configured in Kubernetes, ensuring that data at rest is secured.
impact: |
Misconfigured encryption providers can lead to unsecured data at rest, potentially exposing sensitive information to unauthorized access.
remediation: |
Ensure that the encryption provider configuration file is set up correctly and referenced properly in the API server configuration. Encryption should be enabled and configured according to the security best practices.
reference:
- https://kubernetes.io/docs/tasks/administer-cluster/encrypt-data/
tags: cloud,devops,kubernetes,devsecops,encryption,k8s,k8s-cluster-security
variables:
argument: "encryption-provider-config"
self-contained: true
code:
- engine:
- sh
- bash
source: |
kubectl get pods -n kube-system -l component=kube-apiserver -o jsonpath="{.items[*].spec.containers[*].command}"
matchers-condition: and
matchers:
- type: word
words:
- 'kube-apiserver'
- type: word
words:
- "encryption-provider-config"
negative: true
extractors:
- type: dsl
dsl:
- '"API server configuration is missing the " + argument + " argument"'
# digest: 4b0a00483046022100804e50538e2b5172451e7af717c072c76d154e8459152c27695f28fb32ac3891022100d4b38531916b63c697db715e50dc59fc66ee965853fbade66739cff10da2314c:922c64590222798bb761d5b6d8e72950