---
name: "kube-linter-k8s-manifest-audit"
description: "Enforce production readiness and security guardrails on Kubernetes YAML and Helm charts."
metadata:
  author: "StackRox / Red Hat"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "run kubelinter on manifests"
  - "fix kubernetes pod security kubelinter"
  - "audit helm chart kubelinter"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# KubeLinter Kubernetes YAML & Helm Security Checks

Scans Kubernetes resources with KubeLinter: detecting privileged containers, missing resource limits, writable root filesystems, sensitive volume mounts, and default service account abuse.

## When to Invoke
Invoke this skill whenever you need to:
- run kubelinter on manifests
- fix kubernetes pod security kubelinter
- audit helm chart kubelinter

## Execution SOP & Rules
1. Execute kube-linter lint manifests/ or kube-linter lint ./helm-chart in CI pipelines.
2. Ensure all containers specify cpu and memory limits to prevent cluster resource starvation.
3. Set readOnlyRootFilesystem: true and mount an emptyDir volume for writable temporary files.
4. Set automountServiceAccountToken: false on pods that do not require Kubernetes API access.

## 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.
