Skip to content

Commit

Permalink
Merge pull request #1995 from alphagov/add-restricted-capbilities-cro…
Browse files Browse the repository at this point in the history
…n-jobs

Add securityContext from cron-jobs containers
  • Loading branch information
theseanything authored May 1, 2024
2 parents 4bfd76b + 7840bcc commit 29e8b4f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/generic-govuk-app/templates/cron-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ spec:
automountServiceAccountToken: {{- if .serviceAccount }} true {{- else }} false {{- end }}
enableServiceLinks: false
securityContext:
seccompProfile:
type: RuntimeDefault
fsGroup: {{ $.Values.securityContext.runAsGroup }}
runAsNonRoot: {{ $.Values.securityContext.runAsNonRoot }}
runAsUser: {{ $.Values.securityContext.runAsUser }}
Expand Down Expand Up @@ -91,6 +93,8 @@ spec:
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
volumeMounts:
- name: app-tmp
mountPath: /tmp
Expand Down

0 comments on commit 29e8b4f

Please sign in to comment.