F-01 Critical
CI service account bound to cluster-admin
Where: ClusterRoleBinding ci-deployer-admin → ServiceAccount ci/deployer
Why it matters: Anyone who can run a pipeline job (or steal its token) owns the whole cluster, including every Secret in every namespace.
CIS Kubernetes Benchmark v1.8: 5.1.1 · SOC 2: CC6.1, CC6.3 · ISO 27001:2022: A.8.2, A.5.15
# Replace cluster-admin with a namespaced role per target namespace
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: deployer
namespace: payments
rules:
- apiGroups: ["apps"]
resources: ["deployments"]
verbs: ["get", "list", "patch", "update"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: deployer
namespace: payments
subjects:
- kind: ServiceAccount
name: deployer
namespace: ci
roleRef:
kind: Role
name: deployer
apiGroup: rbac.authorization.k8s.io
F-02 Critical
Privileged container with hostPath / mounted
Where: DaemonSet monitoring/node-agent (container: agent)
Why it matters: privileged: true plus the host root filesystem means a compromise of this pod is a compromise of every node it runs on.
CIS Kubernetes Benchmark v1.8: 5.2.2, 5.2.12 · SOC 2: CC6.1, CC6.8 · ISO 27001:2022: A.8.9
# Mount only what the agent reads, read-only, and drop privileged
securityContext:
privileged: false
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
add: ["SYS_PTRACE"] # only if the vendor docs require it
volumeMounts:
- name: proc
mountPath: /host/proc
readOnly: true
F-03 High
No NetworkPolicy in 6 of 9 application namespaces
Where: payments, orders, users, notifications, search, admin
Why it matters: Any pod can reach any other pod and the database, so one vulnerable service gives an attacker the whole internal network.
CIS Kubernetes Benchmark v1.8: 5.3.2 · SOC 2: CC6.6 · ISO 27001:2022: A.8.20, A.8.22
# Start with default-deny per namespace, then allow what each app needs
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny
namespace: payments
spec:
podSelector: {}
policyTypes: ["Ingress", "Egress"]
F-04 High
Workloads use the default ServiceAccount with an auto-mounted token
Where: 31 of 38 Deployments
Why it matters: Every pod carries an API token it never uses. If an app is compromised, the token is the attacker's first foothold in the API.
CIS Kubernetes Benchmark v1.8: 5.1.5, 5.1.6 · SOC 2: CC6.1 · ISO 27001:2022: A.5.15, A.8.2
apiVersion: v1
kind: ServiceAccount
metadata:
name: default
namespace: payments
automountServiceAccountToken: false
F-05 High
Containers run as root, privilege escalation not disabled
Where: 22 containers across 6 namespaces
Why it matters: Running as UID 0 turns a container-escape bug into root on the node. The Pod Security "restricted" profile blocks this.
CIS Kubernetes Benchmark v1.8: 5.2.6, 5.2.7 · SOC 2: CC6.8 · ISO 27001:2022: A.8.9
# Namespace-level enforcement (warn first, then enforce)
kubectl label ns payments \
pod-security.kubernetes.io/warn=restricted \
pod-security.kubernetes.io/enforce=baseline
F-06 High
Secrets passed as environment variables
Where: payments/api, users/api (DATABASE_URL, STRIPE_KEY)
Why it matters: Env vars leak into crash dumps, debug endpoints and kubectl describe output. Files are easier to scope and rotate.
CIS Kubernetes Benchmark v1.8: 5.4.1 · SOC 2: CC6.1, CC6.7 · ISO 27001:2022: A.5.17, A.8.24
# Mount as a read-only file instead of env
volumes:
- name: db-creds
secret:
secretName: payments-db
volumeMounts:
- name: db-creds
mountPath: /var/run/secrets/db
readOnly: true
Remaining findings (full write-up and fixes in the delivered report)
| ID | Severity | Finding | CIS | SOC 2 |
| F-07 | Medium | Images pulled by :latest tag in 9 workloads | - | CC8.1 |
| F-08 | Medium | No CPU/memory limits on 14 containers | - | A1.1 |
| F-09 | Medium | Workloads deployed to the default namespace | 5.7.4 | CC6.1 |
| F-10 | Medium | Wildcard verbs in Role admin/ops-tools | 5.1.3 | CC6.3 |
| F-11 | Medium | API server audit logging not shipped off-cluster | 3.2.1 | CC7.2 |
| F-12 | Low | readOnlyRootFilesystem not set on stateless apps | - | CC6.8 |
| F-13 | Low | Capabilities not dropped (ALL) on 18 containers | 5.2.10 | CC6.8 |
| F-14 | Low | No PodDisruptionBudget on 3 critical services | - | A1.2 |