Repository navigation
KubePosture v1.0.0
First release of KubePosture, an offline Kubernetes security posture scanner for YAML manifests.
What it does:
- Scans individual manifest files or whole directory trees (multi-document YAML supported), fully offline. No cluster access, no network calls.
- Decodes Pod, Deployment, StatefulSet, DaemonSet, Job and CronJob into a uniform workload view, plus Role, ClusterRole, RoleBinding, ClusterRoleBinding, NetworkPolicy, ServiceAccount, Service and Ingress. Unknown kinds are skipped and malformed documents are reported as warnings, never a crash.
- Runs 26 checks (KP001 to KP026) aligned with the CIS Kubernetes Benchmark, covering privileged containers, host namespace sharing, hostPath volumes, capabilities, resource limits and requests, image tag and digest pinning, probes, seccomp, service account token automounting, literal secrets in environment variables, RBAC wildcards, cluster-admin bindings and NetworkPolicy coverage. Every rule has a severity, a remediation line, and a CIS reference where a control genuinely maps.
- Outputs a human-readable table, a JSON report with severity summary, or SARIF 2.1.0 for code-scanning tools.
- CI-friendly exit codes: 1 when a finding reaches the --fail-on severity (default high), 2 when the scan cannot run.
Testing: 47 Go test functions across the loader, rules, reporters and the CLI, including per-rule positive and negative cases and an end-to-end pair (a hardened manifest set with zero findings, and an insecure set that triggers 24 of the 26 rules). gofmt, go vet and go test all pass locally and in CI.
Not in this release (roadmap, stated plainly): live cluster mode, file and line locations in SARIF results, and per-rule configuration.