Skip to content

Commit

Permalink
bugfix - KICS Privilege Escalation Allowed violation
Browse files Browse the repository at this point in the history
added runAsUser: 100
  • Loading branch information
shijinrajbosch committed Jun 23, 2023
1 parent 7734dd7 commit 2e229ec
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions charts/discoveryfinder/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ spec:
labels:
app: {{ $deployment_name }}
spec:
securityContext:
runAsUser: 100
containers:
- name: {{ $deployment_name }}
image: {{ .Values.discoveryfinder.image.registry }}/{{ .Values.discoveryfinder.image.repository }}:{{ .Values.discoveryfinder.image.version | default .Chart.AppVersion }}
Expand All @@ -27,6 +29,7 @@ spec:
# Containers should not run with allowPrivilegeEscalation in order to prevent them from gaining more privileges than their parent process
# Refer Set the security context for a Pod section here - https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
securityContext:
runAsUser: 100
allowPrivilegeEscalation: false
livenessProbe:
httpGet:
Expand Down

0 comments on commit 2e229ec

Please sign in to comment.