Repository: cdk8s-team/cdk8s-plus
Pull request #1154 (2022-09-17 00:02:47)

feat(container, pod): default `runAsNonRoot` to true (#1143)
# Backport

This will backport the following commits from `k8s-24/main` to `k8s-22/main`:
 - [feat(container, pod): default `runAsNonRoot` to true (#1143)](https://github.com/cdk8s-team/cdk8s-plus/pull/1143)

<!--- Backport version: 8.9.3 -->

### Questions ?
Please refer to the [Backport tool documentation](https://github.com/sqren/backport)


Patch:
diff --git a/src/container.ts b/src/container.ts
index ec69e0f7..11fc6327 100644
--- a/src/container.ts
+++ b/src/container.ts
@@ -35,7 +35,7 @@ export interface ContainerSecurityContextProps {
     * If true, the Kubelet will validate the image at runtime to ensure that it does
     * not run as UID 0 (root) and fail to start the container if it does.
     *
-    * @default false
+    * @default true
     */
   readonly ensureNonRoot?: boolean;
 
@@ -132,7 +132,7 @@ export class ContainerSecurityContext {
   public readonly group?: number;
 
   constructor(props: ContainerSecurityContextProps = {}) {
-    this.ensureNonRoot = props.ensureNonRoot ?? false;
+    this.ensureNonRoot = props.ensureNonRoot ?? true;
     this.privileged = props.privileged ?? false;
     this.readOnlyRootFilesystem = props.readOnlyRootFilesystem ?? true;
     this.user = props.user ?? 25000;
@@ -636,7 +636,7 @@ export interface ContainerProps {
    * @see https://kubernetes.io/docs/tasks/configure-pod-container/security-context/
    * @default
    *
-   *   ensureNonRoot: false
+   *   ensureNonRoot: true
    *   privileged: false
    *   readOnlyRootFilesystem: true
    */
diff --git a/src/pod.ts b/src/pod.ts
index 65e99e0c..4c88cbc2 100644
--- a/src/pod.ts
+++ b/src/pod.ts
@@ -288,7 +288,7 @@ export interface PodSecurityContextProps {
    * If true, the Kubelet will validate the image at runtime to ensure that it does
    * not run as UID 0 (root) and fail to start the container if it does.
    *
-   * @default false
+   * @default true
    */
   readonly ensureNonRoot?: boolean;
 
@@ -375,7 +375,7 @@ export interface AbstractPodProps extends base.ResourceProps {
    * @default
    *
    *   fsGroupChangePolicy: FsGroupChangePolicy.FsGroupChangePolicy.ALWAYS
-   *   ensureNonRoot: false
+   *   ensureNonRoot: true
    */
   readonly securityContext?: PodSecurityContextProps;
 
@@ -743,7 +743,7 @@ export class PodSecurityContext {
   private readonly _sysctls: Sysctl[] = [];
 
   constructor(props: PodSecurityContextProps = {}) {
-    this.ensureNonRoot = props.ensureNonRoot ?? false;
+    this.ensureNonRoot = props.ensureNonRoot ?? true;
     this.fsGroupChangePolicy = props.fsGroupChangePolicy ?? FsGroupChangePolicy.ALWAYS;
     this.user = props.user;
     this.group = props.group;


Test patch:
diff --git a/test/__snapshots__/container.test.ts.snap b/test/__snapshots__/container.test.ts.snap
index 61e4082e..4af78c31 100644
--- a/test/__snapshots__/container.test.ts.snap
+++ b/test/__snapshots__/container.test.ts.snap
@@ -37,7 +37,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
           "startupProbe": Object {
@@ -52,7 +52,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -92,7 +92,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -101,7 +101,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -155,7 +155,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
           "startupProbe": Object {
@@ -171,7 +171,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -211,7 +211,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
           "volumeMounts": Array [
@@ -226,7 +226,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
       "volumes": Array [
diff --git a/test/__snapshots__/cron-job.test.ts.snap b/test/__snapshots__/cron-job.test.ts.snap
index 370e6b28..08eff320 100644
--- a/test/__snapshots__/cron-job.test.ts.snap
+++ b/test/__snapshots__/cron-job.test.ts.snap
@@ -42,7 +42,7 @@ Array [
                     "privileged": false,
                     "readOnlyRootFilesystem": true,
                     "runAsGroup": 26000,
-                    "runAsNonRoot": false,
+                    "runAsNonRoot": true,
                     "runAsUser": 25000,
                   },
                 },
@@ -51,7 +51,7 @@ Array [
               "restartPolicy": "Never",
               "securityContext": Object {
                 "fsGroupChangePolicy": "Always",
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
               },
               "setHostnameAsFQDN": false,
             },
@@ -107,7 +107,7 @@ Array [
                     "privileged": false,
                     "readOnlyRootFilesystem": true,
                     "runAsGroup": 26000,
-                    "runAsNonRoot": false,
+                    "runAsNonRoot": true,
                     "runAsUser": 25000,
                   },
                 },
@@ -116,7 +116,7 @@ Array [
               "restartPolicy": "Never",
               "securityContext": Object {
                 "fsGroupChangePolicy": "Always",
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
               },
               "setHostnameAsFQDN": false,
             },
diff --git a/test/__snapshots__/daemon-set.test.ts.snap b/test/__snapshots__/daemon-set.test.ts.snap
index fdeb604b..14725f68 100644
--- a/test/__snapshots__/daemon-set.test.ts.snap
+++ b/test/__snapshots__/daemon-set.test.ts.snap
@@ -42,7 +42,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -51,7 +51,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -103,7 +103,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -112,7 +112,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
diff --git a/test/__snapshots__/deployment.test.ts.snap b/test/__snapshots__/deployment.test.ts.snap
index cd6b977b..e0a5868a 100644
--- a/test/__snapshots__/deployment.test.ts.snap
+++ b/test/__snapshots__/deployment.test.ts.snap
@@ -56,7 +56,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
               "startupProbe": Object {
@@ -71,7 +71,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -189,7 +189,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -198,7 +198,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -289,7 +289,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
               "startupProbe": Object {
@@ -304,7 +304,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -386,7 +386,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -396,7 +396,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -477,7 +477,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -486,7 +486,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -566,7 +566,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -575,7 +575,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -636,7 +636,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -645,7 +645,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -718,7 +718,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -727,7 +727,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -788,7 +788,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -797,7 +797,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -867,7 +867,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -876,7 +876,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -959,7 +959,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -968,7 +968,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1048,7 +1048,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1057,7 +1057,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1118,7 +1118,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1127,7 +1127,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1200,7 +1200,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1209,7 +1209,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1270,7 +1270,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1279,7 +1279,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1349,7 +1349,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1358,7 +1358,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1441,7 +1441,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1450,7 +1450,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1530,7 +1530,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1539,7 +1539,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1617,7 +1617,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1626,7 +1626,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1701,7 +1701,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1710,7 +1710,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1752,7 +1752,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1761,7 +1761,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
       "tolerations": Array [
diff --git a/test/__snapshots__/network-policy.test.ts.snap b/test/__snapshots__/network-policy.test.ts.snap
index 6e19d3f3..7771069d 100644
--- a/test/__snapshots__/network-policy.test.ts.snap
+++ b/test/__snapshots__/network-policy.test.ts.snap
@@ -124,7 +124,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -133,7 +133,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -168,7 +168,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -177,7 +177,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -253,7 +253,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -262,7 +262,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -316,7 +316,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -325,7 +325,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -403,7 +403,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -412,7 +412,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -485,7 +485,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -494,7 +494,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -566,7 +566,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -575,7 +575,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -652,7 +652,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -661,7 +661,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -746,7 +746,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -755,7 +755,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -836,7 +836,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -845,7 +845,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -940,7 +940,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -949,7 +949,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1025,7 +1025,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1034,7 +1034,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1111,7 +1111,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1120,7 +1120,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1155,7 +1155,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1164,7 +1164,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1240,7 +1240,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1249,7 +1249,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1303,7 +1303,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1312,7 +1312,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1390,7 +1390,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1399,7 +1399,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1472,7 +1472,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1481,7 +1481,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1553,7 +1553,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1562,7 +1562,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1639,7 +1639,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1648,7 +1648,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1733,7 +1733,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1742,7 +1742,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1823,7 +1823,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1832,7 +1832,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1927,7 +1927,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1936,7 +1936,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2012,7 +2012,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2021,7 +2021,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2098,7 +2098,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2107,7 +2107,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2180,7 +2180,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -2189,7 +2189,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
diff --git a/test/__snapshots__/pod.test.ts.snap b/test/__snapshots__/pod.test.ts.snap
index a92809e0..0567e45b 100644
--- a/test/__snapshots__/pod.test.ts.snap
+++ b/test/__snapshots__/pod.test.ts.snap
@@ -56,7 +56,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -65,7 +65,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -167,7 +167,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
           "startupProbe": Object {
@@ -182,7 +182,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -222,7 +222,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -231,7 +231,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -297,7 +297,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -306,7 +306,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -346,7 +346,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -355,7 +355,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -421,7 +421,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -430,7 +430,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -470,7 +470,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -479,7 +479,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -591,7 +591,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
           "startupProbe": Object {
@@ -606,7 +606,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -646,7 +646,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -655,7 +655,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -721,7 +721,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -730,7 +730,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -770,7 +770,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -779,7 +779,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -845,7 +845,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -854,7 +854,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -894,7 +894,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -903,7 +903,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -997,7 +997,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1006,7 +1006,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1075,7 +1075,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1084,7 +1084,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1192,7 +1192,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1201,7 +1201,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1298,7 +1298,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1307,7 +1307,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1347,7 +1347,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1356,7 +1356,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1472,7 +1472,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -1481,7 +1481,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -1523,7 +1523,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1532,7 +1532,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1691,7 +1691,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1700,7 +1700,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1735,7 +1735,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1744,7 +1744,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1784,7 +1784,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1793,7 +1793,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -1894,7 +1894,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -1903,7 +1903,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2013,7 +2013,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2022,7 +2022,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2062,7 +2062,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2071,7 +2071,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2223,7 +2223,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2232,7 +2232,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2334,7 +2334,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2343,7 +2343,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2437,7 +2437,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2446,7 +2446,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2515,7 +2515,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2524,7 +2524,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2632,7 +2632,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2641,7 +2641,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2748,7 +2748,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2757,7 +2757,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2797,7 +2797,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2806,7 +2806,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -2922,7 +2922,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -2931,7 +2931,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -2973,7 +2973,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -2982,7 +2982,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3141,7 +3141,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3150,7 +3150,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3185,7 +3185,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3194,7 +3194,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3234,7 +3234,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3243,7 +3243,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3344,7 +3344,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3353,7 +3353,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3463,7 +3463,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3472,7 +3472,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3512,7 +3512,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3521,7 +3521,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3673,7 +3673,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3682,7 +3682,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3784,7 +3784,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3793,7 +3793,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3833,7 +3833,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3842,7 +3842,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -3926,7 +3926,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -3935,7 +3935,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4027,7 +4027,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4036,7 +4036,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4120,7 +4120,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4129,7 +4129,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4208,7 +4208,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4217,7 +4217,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4257,7 +4257,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4266,7 +4266,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4364,7 +4364,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -4373,7 +4373,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
@@ -4525,7 +4525,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4535,7 +4535,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4595,7 +4595,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4604,7 +4604,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4663,7 +4663,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4672,7 +4672,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4712,7 +4712,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4721,7 +4721,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4773,7 +4773,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4782,7 +4782,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4822,7 +4822,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4831,7 +4831,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4880,7 +4880,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4889,7 +4889,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -4946,7 +4946,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -4955,7 +4955,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5010,7 +5010,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5019,7 +5019,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5059,7 +5059,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5068,7 +5068,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5120,7 +5120,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5129,7 +5129,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5169,7 +5169,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5178,7 +5178,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5227,7 +5227,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5236,7 +5236,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5293,7 +5293,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5302,7 +5302,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5364,7 +5364,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5373,7 +5373,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
     },
@@ -5413,7 +5413,7 @@ Array [
             "privileged": false,
             "readOnlyRootFilesystem": true,
             "runAsGroup": 26000,
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
             "runAsUser": 25000,
           },
         },
@@ -5422,7 +5422,7 @@ Array [
       "restartPolicy": "Always",
       "securityContext": Object {
         "fsGroupChangePolicy": "Always",
-        "runAsNonRoot": false,
+        "runAsNonRoot": true,
       },
       "setHostnameAsFQDN": false,
       "tolerations": Array [
diff --git a/test/__snapshots__/service.test.ts.snap b/test/__snapshots__/service.test.ts.snap
index b1335a56..c3caef62 100644
--- a/test/__snapshots__/service.test.ts.snap
+++ b/test/__snapshots__/service.test.ts.snap
@@ -83,7 +83,7 @@ Array [
                 "privileged": false,
                 "readOnlyRootFilesystem": true,
                 "runAsGroup": 26000,
-                "runAsNonRoot": false,
+                "runAsNonRoot": true,
                 "runAsUser": 25000,
               },
             },
@@ -92,7 +92,7 @@ Array [
           "restartPolicy": "Always",
           "securityContext": Object {
             "fsGroupChangePolicy": "Always",
-            "runAsNonRoot": false,
+            "runAsNonRoot": true,
           },
           "setHostnameAsFQDN": false,
         },
diff --git a/test/container.test.ts b/test/container.test.ts
index 790f0b6b..db14b0e4 100644
--- a/test/container.test.ts
+++ b/test/container.test.ts
@@ -264,7 +264,7 @@ describe('Container', () => {
     expect(container.env[0].value).toEqual('value');
     expect(container.securityContext.privileged).toEqual(false);
     expect(container.securityContext.readOnlyRootFilesystem).toEqual(true);
-    expect(container.securityContext.runAsNonRoot).toEqual(false);
+    expect(container.securityContext.runAsNonRoot).toEqual(true);
     expect(container.startupProbe.failureThreshold).toEqual(3);
     expect(container.startupProbe.tcpSocket.port).toEqual(9000);
   });
@@ -649,7 +649,7 @@ test('default security context', () => {
 
   const container = new Container({ image: 'image' });
 
-  expect(container.securityContext.ensureNonRoot).toBeFalsy();
+  expect(container.securityContext.ensureNonRoot).toBeTruthy();
   expect(container.securityContext.privileged).toBeFalsy();
   expect(container.securityContext.readOnlyRootFilesystem).toBeTruthy();
 
diff --git a/test/pod.test.ts b/test/pod.test.ts
index d2f4a071..b2c4edb1 100644
--- a/test/pod.test.ts
+++ b/test/pod.test.ts
@@ -316,7 +316,7 @@ test('default security context', () => {
 
   const spec = Testing.synth(chart)[0].spec;
 
-  expect(pod.securityContext.ensureNonRoot).toBeFalsy();
+  expect(pod.securityContext.ensureNonRoot).toBeTruthy();
   expect(pod.securityContext.sysctls).toEqual([]);
   expect(pod.securityContext.fsGroup).toBeUndefined();
   expect(pod.securityContext.fsGroupChangePolicy).toEqual(FsGroupChangePolicy.ALWAYS);