Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

feat: add configurable security contexts for Infisical app pod and container

Victor Hugo dos Santos5ee45ebc0562
diff --git a/helm-charts/infisical-standalone-postgres/CHANGELOG.md b/helm-charts/infisical-standalone-postgres/CHANGELOG.md
index f1cbfa3158..cebe8ba0f6 100644
--- a/helm-charts/infisical-standalone-postgres/CHANGELOG.md
+++ b/helm-charts/infisical-standalone-postgres/CHANGELOG.md
@@ -1,3 +1,11 @@
+## 1.10.0 (July 3, 2026)
+Changes:
+* Added configurable `securityContext` for the Infisical app pod and container via `infisical.podSecurityContext` and `infisical.containerSecurityContext`. This allows the chart to run under the Kubernetes Pod Security "restricted" standard without external mutation.
+* The same `infisical.podSecurityContext` / `infisical.containerSecurityContext` values are also applied to the auto-bootstrap Job (`infisical.autoBootstrap.enabled`) and its init container, so a full install (including auto-bootstrap) is admitted in a `restricted`-enforced namespace.
+* Both keys ship with hardened, secure-by-default values that match the image's non-root `USER 1001`: pod defaults set `runAsNonRoot: true`, `runAsUser: 1001`, `fsGroup: 1001`, `seccompProfile.type: RuntimeDefault`; container defaults set `allowPrivilegeEscalation: false`, `capabilities.drop: ["ALL"]`, `runAsNonRoot: true`, `runAsUser: 1001`.
+* `containerSecurityContext.readOnlyRootFilesystem` is kept `false` by default because the Node.js app writes temporary files. To enable it, mount `emptyDir` volumes for the app's writable paths (e.g. `/tmp`) via `infisical.extraVolumes` / `infisical.extraVolumeMounts`.
+* This change is backwards compatible, but the pod-spec change triggers a one-time rollout on upgrade. Set either key to `null` to render a pod spec without that security context block.
+
## 1.9.0 (May 28, 2026)
Changes:
* Added support for sidecar containers via `infisical.extraContainers`, enabling use cases like HSM PKCS#11 client sidecars (e.g., Entrust nShield).
diff --git a/helm-charts/infisical-standalone-postgres/Chart.yaml b/helm-charts/infisical-standalone-postgres/Chart.yaml
index c81c9d4a9e..593944c5a6 100644
--- a/helm-charts/infisical-standalone-postgres/Chart.yaml
+++ b/helm-charts/infisical-standalone-postgres/Chart.yaml
@@ -7,7 +7,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
-version: 1.9.0
+version: 1.10.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
diff --git a/helm-charts/infisical-standalone-postgres/README.md b/helm-charts/infisical-standalone-postgres/README.md
index cb77ecb40a..723c2cba64 100644
--- a/helm-charts/infisical-standalone-postgres/README.md
+++ b/helm-charts/infisical-standalone-postgres/README.md
@@ -18,6 +18,7 @@ A helm chart to deploy Infisical
|-----|------|---------|-------------|
| fullnameOverride | string | `""` | Overrides the full name of the release, affecting resource names |
| infisical.affinity | object | `{}` | Node affinity settings for pod placement |
+| infisical.containerSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":false,"runAsNonRoot":true,"runAsUser":1001}` | Container-level security context applied to the Infisical container. Secure by default. `readOnlyRootFilesystem` is kept `false` because the Node.js app writes temporary files; to enable it, mount `emptyDir` volumes for the app's writable paths via `infisical.extraVolumes` / `infisical.extraVolumeMounts`. Set to `null` to omit the block. |
| infisical.databaseSchemaMigrationJob.image.pullPolicy | string | `"IfNotPresent"` | Pulls image only if not present on the node |
| infisical.databaseSchemaMigrationJob.image.repository | string | `"ghcr.io/groundnuty/k8s-wait-for"` | Image repository for migration wait job |
| infisical.databaseSchemaMigrationJob.image.tag | string | `"no-root-v2.0"` | Image tag version |
@@ -36,6 +37,7 @@ A helm chart to deploy Infisical
| infisical.kubeSecretRef | string | `"infisical-secrets"` | Kubernetes Secret reference containing Infisical root credentials |
| infisical.name | string | `"infisical"` | |
| infisical.podAnnotations | object | `{}` | Custom annotations for Infisical pods |
+| infisical.podSecurityContext | object | `{"fsGroup":1001,"runAsNonRoot":true,"runAsUser":1001,"seccompProfile":{"type":"RuntimeDefault"}}` | Pod-level security context applied to the Infisical pod. Secure by default; matches the image's non-root `USER 1001`. Set to `null` to omit the block. |
| infisical.replicaCount | int | `2` | Number of pod replicas for high availability |
| infisical.resources.limits.memory | string | `"600Mi"` | Memory limit for Infisical container |
| infisical.resources.requests.cpu | string | `"350m"` | CPU request for Infisical container |
diff --git a/helm-charts/infisical-standalone-postgres/templates/bootstrap-job.yaml b/helm-charts/infisical-standalone-postgres/templates/bootstrap-job.yaml
index 23cac2bb86..82a3d005ff 100644
--- a/helm-charts/infisical-standalone-postgres/templates/bootstrap-job.yaml
+++ b/helm-charts/infisical-standalone-postgres/templates/bootstrap-job.yaml
@@ -21,6 +21,9 @@ spec:
helm.sh/chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
spec:
serviceAccountName: {{ include "infisical.serviceAccountName" . }}
+ {{- with $infisicalValues.podSecurityContext }}
+ securityContext: {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- if $infisicalValues.image.imagePullSecrets }}
imagePullSecrets:
{{- toYaml $infisicalValues.image.imagePullSecrets | nindent 6 }}
@@ -29,6 +32,9 @@ spec:
initContainers:
- name: wait-for-infisical
image: curlimages/curl:8.14.1
+ {{- with $infisicalValues.containerSecurityContext }}
+ securityContext: {{- toYaml . | nindent 10 }}
+ {{- end }}
command: ['sh', '-c']
args:
- |
@@ -42,6 +48,9 @@ spec:
- name: infisical-bootstrap
image: "infisical/cli:{{ $infisicalValues.autoBootstrap.image.tag }}"
imagePullPolicy: {{ $infisicalValues.image.pullPolicy | default "IfNotPresent" }}
+ {{- with $infisicalValues.containerSecurityContext }}
+ securityContext: {{- toYaml . | nindent 12 }}
+ {{- end }}
args:
- bootstrap
- --domain=http://{{ include "infisical.fullname" . }}:8080
diff --git a/helm-charts/infisical-standalone-postgres/templates/infisical.yaml b/helm-charts/infisical-standalone-postgres/templates/infisical.yaml
index 39fce528d0..5fbb024aca 100644
--- a/helm-charts/infisical-standalone-postgres/templates/infisical.yaml
+++ b/helm-charts/infisical-standalone-postgres/templates/infisical.yaml
@@ -26,6 +26,9 @@ spec:
{{- end }}
spec:
serviceAccountName: {{ include "infisical.serviceAccountName" . }}
+ {{- with $infisicalValues.podSecurityContext }}
+ securityContext: {{- toYaml . | nindent 8 }}
+ {{- end }}
{{- with $infisicalValues.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
@@ -54,6 +57,9 @@ spec:
- name: {{ template "infisical.name" . }}-{{ $infisicalValues.name }}
image: "{{ $infisicalValues.image.repository }}:{{ $infisicalValues.image.tag }}"
imagePullPolicy: {{ $infisicalValues.image.pullPolicy }}
+ {{- with $infisicalValues.containerSecurityContext }}
+ securityContext: {{- toYaml . | nindent 10 }}
+ {{- end }}
readinessProbe:
httpGet:
path: /api/status
diff --git a/helm-charts/infisical-standalone-postgres/values.yaml b/helm-charts/infisical-standalone-postgres/values.yaml
index 4157d0acbc..1b54c51c3b 100644
--- a/helm-charts/infisical-standalone-postgres/values.yaml
+++ b/helm-charts/infisical-standalone-postgres/values.yaml
@@ -99,6 +99,27 @@ infisical:
# -- value: /etc/ssl/certs/ca-certificates.crt
extraEnv: []
+ # -- Pod-level security context applied to the Infisical pod. Secure by default.
+ # -- The Infisical image runs as non-root UID 1001 (see Dockerfile `USER 1001`).
+ podSecurityContext:
+ runAsNonRoot: true
+ runAsUser: 1001
+ fsGroup: 1001
+ seccompProfile:
+ type: RuntimeDefault
+
+ # -- Container-level security context applied to the Infisical container. Secure by default.
+ # -- `readOnlyRootFilesystem` is kept false because the Node.js app writes temporary files.
+ # -- To enable it, mount emptyDir volumes for the app's writable paths (e.g. /tmp) via
+ # -- `infisical.extraVolumes` / `infisical.extraVolumeMounts`.
+ containerSecurityContext:
+ allowPrivilegeEscalation: false
+ readOnlyRootFilesystem: false
+ runAsNonRoot: true
+ runAsUser: 1001
+ capabilities:
+ drop: ["ALL"]
+
resources:
limits:
# -- Memory limit for Infisical container