Kubernetes
kubectlAn agent with kubectl on its PATH can change what runs in your clusters. Memnox wraps the binary, reads the command before it runs, and matches it against the table below. Nothing here is a list of what we support: it is what the runtime already classifies, and the strings are the ones a rule matches on.
What it reads to authenticate
Discovery records that these exist and hashes them. It never reads a value, so a scan can say three agents reach this file and never what is inside it.
What it cannot undo
Every one of these carries the alternative a refusal names, which is why an agent takes the alternative and finishes the task instead of stopping.
kubectl delete namespace **kubectl.delete-namespacekubectl delete deployment **kubectl.delete-deploymentkubectl delete pvc **kubectl.delete-pvc- takes the volume with it
kubectl delete **kubectl.deletekubectl drain **kubectl.drain
What it changes
Allowed by default, and the obvious first thing to put behind ask.
kubectl apply **kubectl.applykubectl rollout restart **kubectl.rollout-restartkubectl exec **kubectl.exec- a shell inside the cluster
What it only reads
Matched so a rule can say read is fine, rather than leaving it unspoken.
kubectl get **kubectl.getkubectl describe **kubectl.describekubectl logs **kubectl.logs
The rule this writes
[[rules]] name = "kubectl-destructive-asks-first" match.actions = ["kubectl.delete-namespace"] decision.effect = "ask" decision.reason = "This cannot be undone."
memnox protect --for kubectl writes this into memnox.policies.toml from the table above. You can edit it, and the file is yours.
Run npx memnox to find out whether Kubernetes is actually reachable from your machine. It reads your own disk and needs no account.