Skip to content

Latest commit

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Cloud Native Security 🔥

This is a detailed checklist for securing your kubernetes environment.

Kubernetes Security Checklist

Risk ScoreResponsible TeamDescription
10AppsImagePull Policy to set to 'Always'
3AppsHave an annotation for each deployment with owner email, so we can find the dev owner of that app
10Apps & InfraNetwork Policy must be enabled and enforced at least at namespace level
7Apps & InfraIstio policies applied at a higher level in conjunction with Network Policies
10Apps & Infraservice to service traffic should be mTLS using service mesh like istio
9InfraBinary Auth for gcr images
9InfraAdmission controller where InfoSec & SRE enforce policies in prod
8InfraMust use COS or similar hardened OS in Prod
10InfraSeparate registries for prod, dev and staging. No access to a person in prod gcr. A way of promoting images to prod
5InfraAPI server, kubelet upgrade SLA. Follow https://groups.google.com/forum/#!forum/kubernetes-announce and take action
10AppsNo privilaged pods/containers
9AppsNo containers running with default user (default is root!)
10AppsLock down 3rd party app RBAC, don't just accept what's in the docs. Try with lower permissions and go up
10AppsK8s RBAC for user groups (SRE, DevOps, InfoSec, Dev, Debugging, etc.)
7AppsProper use of namespaces (so you can apply network policies, RABC, secret sharing, etc.)
10InfraImage must be scanned for vulnerability and signed before it can be deployed in prod
7AppsPods with unnecessory ADD_CAP are equally dangerous as privilaged pods
6AppsHost mounts, by sharing host mounts, you're removing the filesystem isolation provided by containers
10AppsPods with net=host (network namespace shared between host and the pod)
7AppsDisable Service Account auto-mount
10AppsMake your container filesystem read-only using security context
10AppsDevelopers should use minimal OS and don't stuff the whole runtime and OS
9InfraGKE: subscribe to "Regular" or "Stable" channel for the Kube API server (similar for other hosted k8s)
7InfraEach team should have PSP (Pod Security Policy) enabled with policies and exceptions managed by the SRE team
8InfraDon't allow 'latest' or 'dev' or 'master' image tags in prod. Always use versioned tags
9AppsLimit who can talk to the API serve, exception granted to some 3rd party apps like Twistlock, Calico, istio, helm, etc.
9AppsMust specify resource limits at deployment level (limit admission controller)
5AppsSpecify resource quota per namespace

About

Kubernetes ⛵📦 Security 🔐 Best Practices Checklist 📋 & Slides

Resources

Stars

11 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors