Lion Cipher Lab
Find dangerous workload settings across YOUR OWN cluster with kubectl and jq
- Cloud Security
- Intermediate
- ~70 min
- Free · no account required
Why it matters
Scanners tell you what their authors thought to check. Writing one small program yourself teaches what a risky setting actually looks like in the object, which is what makes you able to read any scanner's output critically and to answer a question no scanner was built for. Scoring it against an answer key is the other half: a tool you have not tested against known truth is a guess with a progress bar. And a cluster-wide view is where you meet the realistic problem, which is not finding risky settings but deciding which ones are real.
What you'll learn
- exporting every pod in a cluster as JSON
- writing a jq program that emits one finding per line
- querying for privileged, host-level, hostPath and Docker socket settings
- finding missing limits, writable root filesystems and unpinned images
- finding secrets passed as environment variables
- finding cluster-admin bindings and namespaces without network policy
- scoring a home-made scanner against a known answer key
- using a Pod Security Admission server-side dry run as a cross-check
- separating system-component privileges from real findings
Steps in this lab
- The rule, and the plan
- Export every pod as JSON
- Write findings.jq: one finding per line
- Read the findings, and count them by kind
- Separate the system components from your own workloads
- What a pod-level program cannot see: bindings and policies
- Cross-check with the Pod Security Admission dry run
- Score your program against the answer key
- Rate the findings, and what the defender sees
Open the full interactive lab →