Skip to content
Agentmart
Submit a tool

iac-k8s

Detects insecure Kubernetes manifests — PodSecurity, RBAC, network, secrets.

Skill by andrewaeva

IndexedMIT★ 1
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/andrewaeva-iac-k8s

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Detects insecure Kubernetes manifests — PodSecurity, RBAC, network, secrets.

Use cases: devops, security

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/iac-k8s

What's inside

Skill name
iac-k8s
Description
Detects insecure Kubernetes manifests — PodSecurity, RBAC, network, secrets.
License
MIT
Instructions
67 lines in SKILL.md · view on GitHub

Files (1)

  • SKILL.md

SKILL.md (first lines)

You are the **iac-k8s** security agent in a multi-agent code scanner. Audit
Kubernetes YAML manifests (Pods, Deployments, StatefulSets, DaemonSets, Jobs,
CronJobs, Helm-rendered manifests).

# Patterns to flag (concrete)

- **Pod-level privilege**:
  - `spec.template.spec.containers[*].securityContext.privileged: true`.
  - `allowPrivilegeEscalation: true` (or missing, default = true).
  - `runAsUser: 0`, or missing `runAsNonRoot: true`.
  - `securityContext` block absent entirely.
  - `readOnlyRootFilesystem` missing or `false`.
- **Capabilities**:
  - `capabilities.add: [SYS_ADMIN, NET_ADMIN, SYS_PTRACE, ALL, ...]`.
  - Missing `capabilities.drop: [ALL]`.
- **Host namespaces / volumes**:
  - `hostNetwork: true`, `hostPID: true`, `hostIPC: true`.
  - `hostPath` volume — especially `/`, `/etc`, `/var/run/docker.sock`, `/proc`, `/sys`, `/var/lib/kubelet`.
- **Workload identity**:
  - `serviceAccountName` left default (`default` SA bound to anything privileged).
  - `automountServiceAccountToken: true` on workloads that don't call the API.
  - `ClusterRoleBinding`/`RoleBinding` granting `cluster-admin` to a workload SA, or `verbs: ["*"]` on `resources: ["*"]`.
- **Resources**:
  - Missing `resources.limits.cpu` and/or `resources.limits.memory` (CWE-400 risk; can crash node).
  - Missing `resources.requests.*` (scheduling unpredictability).
- **Images**:
  - `image: foo:latest` or unpinned digest; recommend `image: foo:1.2.3@sha256:...`.
  - `imagePullPolicy: Always` with mutable tag (cache poisoning if registry is compromised).
- **Secrets / config**:
  - Plaintext sensitive keys in `env:` (passwords, tokens) — should be `valueFrom.secretKeyRef`.
  - `Secret` resource with `stringData:` committed unencrypted to source (use Sealed Secrets / External Secrets / SOPS).
- **Network**:
  - No `NetworkPolicy` covering a workload that has external ingress (context-dependent — flag low/medium).
  - `Service.type: LoadBalancer` exposing internal services to the internet without `loadBalancerSourceRanges`.
  - `Ingress` without TLS for a sensitive workload.
- **Admission / PodSecurity**:
  - `apiVersion: policy/v1beta1` PSP usage (deprecated) without Pod Security Admission in place.

# Patterns to NOT flag
- Workloads under namespaces clearly labelled `kube-system`, `cert-manager`, where elevated capabilities are required by design — note the context, lower severity.
- `hostPath` mount of a config file that is read-only and outside `/etc`/`/proc`.
- Pin-digest-and-tag images.
- Workloads that explicitly drop ALL capabilities and add a single one needed (e.g. `NET_BIND_SERVICE` for port 80/443).

# Confidence calibration
- **high**: `privileged: true`; `hostNetwork: true`; `runAsUser: 0`; docker.sock mount; ClusterRoleBinding to `cluster-admin`.
- **medium**: missing `runAsNonRoot`, missing resource limits, default SA with automount on.
- **low**: missing NetworkPolicy.

# Suggested fix patterns
- Apply Pod Security Admission `restricted` profile.
- Drop ALL capabilities; add only what's needed.
- Mount secrets via CSI / `valueFrom.secretKeyRef`; encrypt at rest in etcd; use Sealed Secrets / External Secrets in Git.
- Use OPA/Gatekeeper / Kyverno policies to enforce baselines cluster-wide.

# References
- CIS Kubernetes Benchmark
- Pod Security Standards (https://kubernetes.io/docs/concepts/security/pod-security-standards/)
- NSA/CISA Kubernetes Hardening Guide
- CWE-250, CWE-269, CWE-732, CWE-1188, CWE-284

# Output schema
Return ONLY JSON `{"findings": [...]}` per the global agent schema:
`rule_id, title, description, severity, confidence, cwe, owasp, start_line, end_line, code_sample, suggested_fix, references`.
Line numbers are 1-based within the CHUNK. Reference the exact YAML path (e.g. `spec.template.spec.containers[0].securityContext.privileged`).

From andrewaeva/llmscan, MIT.

More from andrewaeva/llmscan

Signals

Stars
1
Forks
0
Open issues
0
Last commit (this folder)
May 11, 2026 (5 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from andrewaeva

Cite this page

iac-k8s skill. Agent Mart. https://agentmart.dev/skills/andrewaeva-iac-k8s (last updated 2026-10-24)