---
name: "kube-bench-cis-security-audit"
description: "Audit Kubernetes nodes and master control planes against the official CIS Security Benchmark."
metadata:
  author: "Aqua Security"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "run kube-bench audit"
  - "check cis benchmark k8s"
  - "remediate kube-bench findings"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# kube-bench CIS Kubernetes Benchmark Security Scanner

Audits Kubernetes security using Aqua Security kube-bench: running CIS benchmark test checks (master, etcd, controlplane, worker), inspecting file permissions, API server flags, and reviewing remediation steps.

## When to Invoke
Invoke this skill whenever you need to:
- run kube-bench audit
- check cis benchmark k8s
- remediate kube-bench findings

## Execution SOP & Rules
1. Deploy kube-bench Job using official job.yaml matching target Kubernetes version.
2. Inspect job pod logs: kubectl logs job/kube-bench to view test results (PASS, FAIL, WARN).
3. Follow section remediation guidelines to modify kubelet arguments or system file permissions.
4. Integrate into recurring monthly compliance reports for SOC2/ISO27001 audit verification.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
