Skip to content

Commit

Permalink
Merge pull request #16 from bci-oss/bug/KICS_High_findings
Browse files Browse the repository at this point in the history
bug:KICS high violation fixes
  • Loading branch information
tunacicek authored Jun 27, 2023
2 parents 6fff823 + c6f47f6 commit 86d8172
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ components:
bpns:
title: bpns
type: array
maxItems: 10000
items:
$ref: '#/components/schemas/Bpn'
Bpn:
Expand Down
7 changes: 7 additions & 0 deletions charts/bpndiscovery/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.bpndiscovery.image.registry }}/{{ .Values.bpndiscovery.image.repository }}:{{ .Values.bpndiscovery.image.version | default .Chart.AppVersion }}
Expand All @@ -24,6 +26,11 @@ spec:
{{- end }}
ports:
- containerPort: {{ .Values.bpndiscovery.containerPort }}
# 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:
path: /actuator/health/liveness
Expand Down

0 comments on commit 86d8172

Please sign in to comment.