rohitg00/kubectl-mcp-server/k8s-security
Claude Code and agent skill by rohitg00/kubectl-mcp-server
- community
Checking that the SKILL.md file is still in the repository.
Author "rohitg00" has blocked skill(s)
Audit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and secret management.
Install
npx vskill@latest install rohitg00/kubectl-mcp-server/k8s-securitySKILL.md
The same SKILL.md was published earlier as rohitg00/kubectl-mcp-server/k8s-security.
Kubernetes Security
Security auditing, RBAC management, and policy enforcement using kubectl-mcp-server tools.
Requires thecilium,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
Check Service Account Permissions
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
OPA Gatekeeper
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
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
Cilium Network Policies
Default Deny Template
Security Scanning Workflow
- RBAC Audit
``python kubectl_get(resource_type="clusterroles") kubectl_get(resource_type="roles", namespace) ``
- Policy Compliance
``python get_policy_list() get_policy_list() ``
- Network Isolation
``python analyze_network_policies(namespace) cilium_list_endpoints(namespace) ``
- Pod Security
``python kubectl_get(resource_type="pods", namespace) kubectl_describe(name, namespace) ``
Multi-Cluster Security
Audit across clusters:
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
Security
- Security scanPassed, 96 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingkubernetes-skills/claude/k8s-security/SKILL.md
Popularity
- Repository stars
- 853
- Repository forks
- 166
- Repository npm downloads, 7 days
- 360
- 7-day trend score
- 48
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rohitg00/kubectl-mcp-server/k8s-security)