Reads your Kubernetes manifests and tells you who can become cluster-admin, and how — treating privilege escalation as the graph problem it actually is.
Bastion is an offline Kubernetes RBAC and pod-security attack-path analyzer. It reads a manifest directory, `helm template` output, or a `kubectl get -o yaml` export — never a kubeconfig, never an API server, no network at scan time — and answers the question nobody's linter can: which identity can reach cluster-admin, and through what chain? Escalation in Kubernetes is a graph problem, not a checklist, so Bastion builds the privilege graph and reports the connected path instead of a pile of disconnected warnings. Packaged as production-ready open-source software (PyPI-ready src-layout, MkDocs docs site, CodeQL CI, citable via CITATION.cff), and every escalation finding now ships a least-privilege remediation suggestion — a narrowed-rule YAML snippet synthesised from the offending rule.
`create pods` in a namespace is not 'can start a pod' — it is 'can become any ServiceAccount in that namespace', because a pod spec names the account it runs as. Chain a few individually-defensible grants (CI runs test pods, on-call execs into pods, a controller provisions RBAC) and you have a route from a build token to the whole cluster that no per-resource linter will ever flag. Bastion finds those routes with a deterministic breadth-first search over the privilege graph, explains each hop in prose, cites a file and a line for every edge, tells you which rule to delete, and marks its own confidence when an escalation depends on an assumption it can't verify statically.
Python 3.11+, ruamel.yaml (line numbers), Standard-library graph (deterministic BFS), SARIF 2.1.0, Self-contained HTML + inline SVG, Kubernetes RBAC / PSA, Helm, pytest / ruff / mypy