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

38 lines
1.3 KiB
YAML
Raw Normal View History

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,security,devsecops,encryption
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:
- "Encryption provider configuration is not appropriately set."