Root CA File Not Defined
- Query id: 05fb986f-ac73-4ebb-a5b2-7faafa93d882
- Query name: Root CA File Not Defined
- Platform: Kubernetes
- Severity: Medium
- Category: Encryption
- URL: Github
Description¶
When using kube-controller-manager commands, the '--root-ca-file' should be defined
Documentation
Code samples¶
Code samples with security vulnerabilities¶
Positive test num. 1 - yaml file
apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-controller-manager-amd64:v1.6.0
command: ["kube-controller-manager"]
args: []
restartPolicy: OnFailure
Code samples without security vulnerabilities¶
Negative test num. 1 - yaml file
apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-controller-manager-amd64:v1.6.0
command: ["kube-controller-manager"]
args: ["--root-ca-file=/path/to/ca/file.pem"]
restartPolicy: OnFailure
Negative test num. 2 - yaml file
apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: gcr.io/google_containers/kube-controller-manager-amd64:v1.6.0
command: ["kube-controller-manager","--root-ca-file=/path/to/ca/file.pem"]
args: []
restartPolicy: OnFailure