12 CIS Kubernetes & Dockerfile Security Checks Every Dev Should Run Before Prod (100% Local Tool)
Most container breaches don't come from exotic zero-days — they come from shipping default Dockerfile and Kubernetes Deployment manifests straight to production. Here are the top 8 misconfigurations that show up in almo
Most container breaches don't come from exotic zero-days — they come from shipping default Dockerfile and Kubernetes Deployment manifests straight to production.
Here are the top 8 misconfigurations that show up in almost every early-stage production cluster:
-
Running as root (
USER root/ missingrunAsNonRoot: true) — gives any RCE full root inside the container namespace. -
Mutable
:latestimage tags — breaks reproducible rollbacks and silently pulls breaking upstream updates. -
Writable root filesystem — set
readOnlyRootFilesystem: trueand mount anemptyDironly at/tmp. -
Unrestricted Linux capabilities — always drop
["ALL"]and add back only what is strictly required. -
Hardcoded secrets in
ENVor manifestvalue:— inject via Kubernetes Secrets, Vault, or AWS IRSA. -
Missing
livenessProbe/readinessProbe— causes dropped traffic during rolling deploys. -
Missing
resources.requests/resources.limits— invites noisy-neighbor OOM kills across the node. - Single-stage Docker builds — ships compilers, package caches, and extra CVEs into production images.
Hardened Deployment Template (100/100 CIS Score)
securityContext:
runAsNonRoot: true
runAsUser: 10001
seccompProfile:
type: RuntimeDefault
containers:
- name: api
image: ghcr.io/your-org/api:1.4.2
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
Free 100% Client-Side Auditor
Because nobody should paste private production YAML into a remote server, I built a zero-upload browser auditor that checks all 12 rules locally in 0.1 seconds:
👉 Audit your Dockerfile / K8s YAML free: https://sellerpro-calc-kr.netlify.app/k8s-audit/
If you want pre-hardened Docker, Nginx, GitHub Actions Trivy CI/CD, encrypted S3 Postgres backups, and a 35-point launch checklist, grab the full pack (20% off with PH20): https://sellerprohq.gumroad.com/l/sre-deploy-pack/PH20
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.