iac-k8s
Detects insecure Kubernetes manifests — PodSecurity, RBAC, network, secrets.
Skill by andrewaeva
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.
About
Use cases: devops, security
Reviews
Write a reviewNo 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
- 0.494score
runtime-safety
andrewaeva
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-ghactions
andrewaeva
Detects insecure GitHub Actions workflows — pwn_request, script injection, unpinned actions, over-broad token scopes.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
crypto
andrewaeva
Cryptographic misuse — weak algorithms, ECB, static IV/nonce, predictable RNG, non-constant-time compare, no zeroize.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
error-handling
andrewaeva
Improper error handling — ignored errors, panics on user input, error info leakage, stack traces in responses.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
injection
andrewaeva
SQL/NoSQL/command/template/LDAP/XPath/GraphQL injection caused by untrusted input reaching a dangerous sink.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
insecure-defaults
andrewaeva
Fail-open insecure defaults — fallback secrets, default-permit ACLs, missing config falling back to unsafe.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
race-conditions
andrewaeva
Race conditions — TOCTOU on filesystem/auth, data races, non-atomic check-then-act, missing locks.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
ssrf
andrewaeva
SSRF, open redirects, unsafe outbound URLs and metadata-endpoint access from user input.
SkillCFreshness: C★ 1Claude Code +9
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
- Repository
- github.com/andrewaeva/llmscan
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from andrewaeva
- 0.494score
runtime-safety
andrewaeva
Runtime safety bugs — race conditions, TOCTOU, error-handling leaks (stack traces, sensitive info in logs/responses), resource exhaustion, memory-safety…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
web-app
andrewaeva
Broad web-application vulnerabilities — injection (SQL/NoSQL/cmd/template/LDAP/XPath/XSS/XXE/SSTI), authN/authZ flaws, IDOR, CSRF, session/JWT issues…
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
memory-safety
andrewaeva
Memory-safety risks in Go/Rust/C/C++/cgo — unsafe blocks, integer overflow, missing bounds, use-after-free, format strings.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
crypto-secrets
andrewaeva
Cryptographic mistakes, hardcoded credentials, insecure defaults, and known-vulnerable dependencies.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
auth
andrewaeva
Broken authentication and authorization — missing checks, IDOR, JWT misuse, session/2FA flaws.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
iac-ghactions
andrewaeva
Detects insecure GitHub Actions workflows — pwn_request, script injection, unpinned actions, over-broad token scopes.
SkillCFreshness: C★ 1Claude Code +9
Cite this page
iac-k8s skill. Agent Mart. https://agentmart.dev/skills/andrewaeva-iac-k8s (last updated 2026-10-24)