container-iac-security
БесплатноБез исполняемых скриптовНе проверенAudits container and infrastructure-as-code security — Dockerfiles, docker-compose, Kubernetes manifests/helm charts, Terraform, CloudFormation, Pulumi. Finds…
от jiayaoqijia★ 81 звезда на GitHubОб этом скилле
Container & IaC Security
Dockerfile
rg --files -g 'Dockerfile*' -g '*.dockerfile'
Check each Dockerfile:
- No
USERdirective → runs as root → HIGH (addUSER app+COPY --chown) FROM ...:latestor untagged base → MEDIUM (unreproducible, silent breaking changes)- Secrets in build:
ARG/ENVwith keys,COPY .env, private keys copied in → CRITICAL (they persist in layers even if later deleted — check multi-stage usage) ADD http://...(remote fetch) instead ofCOPY→ MEDIUM;ADD url | shpatterns → HIGHcurl ... | shin RUN → HIGH- Package caches not cleaned,
apt-get upgradein build (non-deterministic) → LOW hygiene - Missing
HEALTHCHECKwhere orchestrator relies on it → LOW - sudo/setuid bits installed in image → MEDIUM
docker-compose / docker run scripts
privileged: true→ CRITICAL unless strongly justified (enumerating what it grants: all caps, host devices)volumes: /var/run/docker.sockmounted → CRITICAL (container escape = host root)network_mode: host→ HIGH (bypasses network isolation)cap_add: SYS_ADMIN|NET_ADMIN|...→ flag each with justification check- Host paths mounted writable (
/:/host) → CRITICAL - Default/weak service passwords (
POSTGRES_PASSWORD: postgres) with published ports (ports:mapping to host) → HIGH - Auth disabled by config on a service with published ports (
AUTH_ENABLED=false-style flags:OBOT_AUTH_ENABLED=false,DISABLE_AUTH,AUTH_REQUIRED=false,--no-auth) → Critical: port + flag = unauthenticated network callers hold the service's full plane — the obot Docker-quickstart pattern (CVE-2026-101065) mapped every request to a synthetic "nobody" user with Owner+Admin roles. Chain-check: with/var/run/docker.sockmounted in the same service, the now-unauthenticated MCP/agent runtime reaches host Docker → host-root takeover. Either signal alone is a near-miss (published port on an authed service is normal; auth-off on an unpublished dev service is a config smell) — the COMBINATION is the finding.
rg -n "ports:" docker-compose.y*ml compose.y*ml
rg -n -i "auth[_-]?(enabled|required)\s*[:=]\s*(false|no|off)|disable[_-]?auth|no[_-]?auth" docker-compose.y*ml compose.y*ml .env
Kubernetes
rg --files -g '*.yaml' -g '*.yml' | xargs grep -ln "kind: Deployment\|kind: Pod\|SecurityContext" 2>/dev/null
- Missing/broken
securityContext:runAsNonRoot: true,readOnlyRootFilesystem: true, dropped capabilities (drop: ["ALL"]) → MEDIUM per gap, HIGH combined on internet-facing services privileged: truein containers → CRITICALhostPathvolumes, especially writable → HIGH/CRITICALautomountServiceAccountToken: true(default) on pods that don't talk to the K8s API → MEDIUM (default creds for lateral movement)- Wildcard RBAC (
verbs: ["*"],resources: ["*"]), cluster-admin bindings to services → HIGH. RBAC escalation verbs: any Role/ClusterRole grantingescalate(self-boost any role),bind(bind higher-priv roles to self), orimpersonate(become any user/SA) → Critical even scoped;verbs: ["get","list"]onsecretsat cluster scope → Critical (reads every credential)
rg -n "escalate|impersonate" -g '*.yaml' -g '*.yml' | rg "verbs|resources" # census: every verb row dispositioned
rg -n 'resources:\s*\[\s*"\*"\s*\]|apiGroups:\s*\[\s*"\*"\s*\]|verbs:\s*\[\s*"\*"\s*\]' -g '*.yaml' -g '*.yml' # census: every wildcard row dispositioned
rg -n "resources:.*secrets" -g '*.yaml' -g '*.yml' | rg -v "namespace" # census: every secret-reading role dispositioned
imagePullPolicy: Alwayswith:latesttags / images from unknown registries → MEDIUM- Resource limits absent (DoS surface) → LOW
- Exposed
type: LoadBalanceron admin/debug services → HIGH - Secrets as plain
ConfigMap/env instead of Secret objects/external secrets → MEDIUM - Ingress (nginx-ingress) annotations:
rg -n "nginx\.ingress\.kubernetes\.io/(configuration-snippet|server-snippet|auth-url|rewrite-target|proxy-ssl)" -g '*.yaml' -g '*.yml'
configuration-snippet/server-snippetin user-editable Ingress objects → config injection by anyone who can create Ingresses (CVE-2021-25742 family); controller must have snippets disabled → HIGH if reachablerewrite-targetwith attacker-influenced capture groups → open redirect/proxy (CVE-2021-25741 family — check controller version)auth-urlwith broad skip/bypass paths (*-snippetsoverriding auth) → HIGH- Egress: no
NetworkPolicywithEgresspolicyType for pods that fetch URLs / call external APIs → MEDIUM alone, raise the paired SSRF finding (see../injection-flaws/SKILL.md) — the fetcher can reach cloud metadata (169.254.169.254) and internal services
rg -n "policyTypes:" -g '*.yaml' -g '*.yml' # any Egress policy at all?
Terraform / CloudFormation / Pulumi
rg -n -i "0\.0\.0\.0/0|::/0" -g '*.tf' -g '*.yaml' -g '*.json'
rg -n -i "ingress|cidr_block
Установить container-iac-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл container-iac-security?
Audits container and infrastructure-as-code security — Dockerfiles, docker-compose, Kubernetes manifests/helm charts, Terraform, CloudFormation, Pulumi. Finds root containers, untagged images, secrets baked into layers, privileged containers, host mounts, overly open security groups, unencrypted storage, and IAM over-privilege. Use when auditing Docker, Kubernetes, Terraform, or cloud infrastructure definitions.
Как установить скилл container-iac-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл container-iac-security запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic