- rule
- K8S-0002
- severity
- critical
- file
- manifests/api-deployment.yaml
- line
- 27
- message
- Container runs with privileged: true
- rule
- K8S-0003
- severity
- high
- file
- manifests/api-deployment.yaml
- line
- 28
- message
- Container shares the host network namespace
- rule
- K8S-0004
- severity
- medium
- file
- manifests/api-deployment.yaml
- line
- 34
- message
- Container has no memory limit
k8s-audit is in design. The rules on this page are the ones it will enforce, written down before the tool exists so they can be argued with.
I build small tools for Linux systems, and I write down how they work.
One of them manages macOS virtual machines on Linux, on top of the virtual GPU that reims-vgpu provides. The other one audits Kubernetes manifests and is still in design. Both report and stop: macosvm doctor lists what is missing on your machine, and a finding is one line with a rule and a file.
I work in Go, Rust and Python, mostly against Linux, containers and cloud infrastructure. Everything I release is MIT licensed and built in the open. A tool you cannot read is a tool you cannot trust.
This site follows the same rule: the work in the open, and no claim I cannot back with a link. Read the design notes.
What exists today
The kind of systems these tools are pointed at. Photos: Moses Cursor Ssebunya (CC0), rawpixel (CC0), MTA Capital Construction (CC BY 2.0).
The rules
K8S-0002: Container runs with privileged: true
A privileged container shares the host's capabilities and can escape its own boundaries. Treat it as a cluster-wide compromise.
securityContext:
privileged: true
| Rule | What it checks | Severity |
|---|---|---|
| K8S-0001 | Container runs as root | high |
| K8S-0002 | Container runs with privileged: true | critical |
| K8S-0003 | Container shares the host network namespace | high |
| K8S-0004 | Container has no memory limit | medium |
| K8S-0005 | Service account token mounted by default | medium |
| K8S-0006 | Image tag is not pinned to a digest | low |
| K8S-0007 | Capability added beyond the default set | medium |
| K8S-0008 | Root filesystem is writable | low |
Click a row to see the manifest fragment it targets. These are the first eight checks. The rest of the CIS Benchmark mapping is still to do.
How I work
I started with a broken homelab and too much curiosity.
That has not changed much. I like the part of security work where you read a system carefully enough to know exactly what it will do when someone pushes on it. Most of the tooling I write exists because I wanted to see one specific thing clearly, and the general-purpose tool did not show it.
I work in the open because the alternative is worse. Every question about a scanner should be answerable by reading the code, and every rule should be one you can disagree with. If you think one of my checks is wrong, open an issue and tell me why. I would rather fix it than defend it.
Contact
Found a bug in something I wrote, or want to argue about a rule?
Issues and pull requests go to the repositories. Discussions are for anything that needs a conversation first: a rule you think is wrong, a tool you want, a problem I have not thought of. I read both, and I answer the ones that come with a reason.