Kubernetes Security
БесплатноЗапускает вложенные скриптыНе проверенAudit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and…
от rohitg00281 установка в других каталогахОб этом скилле
Kubernetes Security
Security auditing, RBAC management, and policy enforcement using kubectl-mcp-server tools.
Requires the
cilium,istio,policy,securitytoolsets: start kubectl-mcp-server with--toolsets default,cilium,istio,policy,security(orMCP_TOOLSETS=default,cilium,istio,policy,security). For deep work, the project-maintained MCP servers may fit better: Kyverno: https://github.com/nirmata/kyverno-mcp.
When to Apply
Use this skill when:
- User mentions: "security", "RBAC", "permissions", "policy", "audit", "secrets"
- Operations: security review, permission check, policy enforcement
- Keywords: "who can", "access control", "compliance", "vulnerable"
Priority Rules
| Priority | Rule | Impact | Tools |
|---|---|---|---|
| 1 | Check cluster-admin bindings first | CRITICAL | kubectl_get |
| 2 | Audit secrets access permissions | CRITICAL | Review role rules |
| 3 | Verify network isolation | HIGH | analyze_network_policies |
| 4 | Check policy compliance | HIGH | kyverno_*, gatekeeper_* |
| 5 | Review pod security contexts | MEDIUM | kubectl_describe |
Quick Reference
| Task | Tool | Example |
|---|---|---|
| List roles | kubectl_get |
kubectl_get(resource_type="roles", namespace) |
| Cluster roles | kubectl_get |
kubectl_get(resource_type="clusterroles") |
| Role bindings | kubectl_get |
kubectl_get(resource_type="roles", namespace) |
| Service accounts | kubectl_get |
kubectl_get(resource_type="serviceaccounts", namespace) |
| Kyverno policies | get_policy_list |
get_policy_list() |
RBAC Auditing
List Roles and Bindings
kubectl_get(resource_type="roles", namespace)
kubectl_get(resource_type="clusterroles")
kubectl_get(resource_type="roles", namespace)
kubectl_get(resource_type="clusterroles")
Check Service Account Permissions
kubectl_get(resource_type="serviceaccounts", namespace)
Common RBAC Patterns
| Pattern | Risk Level | Check |
|---|---|---|
| cluster-admin binding | Critical | kubectl_get(resource_type="clusterroles") |
| Wildcard verbs (*) | High | Review role rules |
| secrets access | High | Check get/list on secrets |
| pod/exec | High | Allows container access |
See RBAC-PATTERNS.md for detailed patterns and remediation.
Policy Enforcement
Kyverno Policies
get_policy_list(namespace)
get_policy_list()
get_policy(name, namespace)
OPA Gatekeeper
get_policy_list()
get_policy(kind, name)
get_policy_list()
Common Policies to Enforce
| Policy | Purpose |
|---|---|
| Disallow privileged | Prevent root containers |
| Require resource limits | Prevent resource exhaustion |
| Restrict host namespaces | Isolate from node |
| Require labels | Ensure metadata |
| Allowed registries | Control image sources |
Secret Management
List Secrets
kubectl_get(resource_type="secrets", namespace)
Secret Best Practices
- Use external secret managers (Vault, AWS SM)
- Encrypt secrets at rest (EncryptionConfiguration)
- Limit secret access via RBAC
- Rotate secrets regularly
Network Policies
List Policies
analyze_network_policies(namespace)
Cilium Network Policies
cilium_list_policies(namespace)
cilium_get_policy(name, namespace)
Default Deny Template
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: default-deny-all
spec:
podSelector: {}
policyTypes:
- Ingress
- Egress
Security Scanning Workflow
RBAC Audit
kubectl_get(resource_type="clusterroles") kubectl_get(resource_type="roles", namespace)Policy Compliance
get_policy_list() get_policy_list()Network Isolation
analyze_network_policies(namespace) cilium_list_endpoints(namespace)Pod Security
kubectl_get(resource_type="pods", namespace) kubectl_describe(name, namespace)
Multi-Cluster Security
Audit across clusters:
kubectl_get(resource_type="clusterroles", context="production")
kubectl_get(resource_type="clusterroles", context="staging")
Automated Audit Script
For comprehensive security audit, see scripts/audit-rbac.py.
Related Tools
- RBAC:
kubectl_get,kubectl_get,kubectl_get - Policy:
kyverno_*,gatekeeper_* - Network:
analyze_network_policies,cilium_policies_* - Istio:
istio_authorizationpolicies_list,istio_peerauthentications_list
Related Skills
- k8s-policy - Policy management
- k8s-cilium - Cilium network security
Установить Kubernetes Security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Kubernetes Security?
Audit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and secret management.
Как установить скилл Kubernetes Security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Kubernetes Security запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub