Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
rohitg00 avatar

K8s Security

  • 11 installs
  • 941 repo stars
  • Updated April 8, 2026
  • rohitg00/kubectl-mcp-server

Helps with security tasks during AI-assisted development.

About

k8s-security is a Claude Code skill for security. It helps solo builders move faster with AI-assisted coding.

  • k8s-security
  • Security
  • AI-coding skill

K8s Security by the numbers

  • 11 all-time installs (skills.sh)
  • Ranked #1,660 of 2,203 Security skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/rohitg00/kubectl-mcp-server --skill k8s-security

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs11
repo stars941
Last updatedApril 8, 2026
Repositoryrohitg00/kubectl-mcp-server

What it does

Helps with security tasks during AI-assisted development.

Files

SKILL.mdMarkdownGitHub ↗

Kubernetes Security

Security auditing, RBAC management, and policy enforcement using kubectl-mcp-server tools.

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

PriorityRuleImpactTools
1Check cluster-admin bindings firstCRITICALget_cluster_role_bindings
2Audit secrets access permissionsCRITICALReview role rules
3Verify network isolationHIGHget_network_policies
4Check policy complianceHIGHkyverno_*, gatekeeper_*
5Review pod security contextsMEDIUMdescribe_pod

Quick Reference

TaskToolExample
List rolesget_rolesget_roles(namespace)
Cluster rolesget_cluster_rolesget_cluster_roles()
Role bindingsget_role_bindingsget_role_bindings(namespace)
Service accountsget_service_accountsget_service_accounts(namespace)
Kyverno policieskyverno_clusterpolicies_list_toolkyverno_clusterpolicies_list_tool()

RBAC Auditing

List Roles and Bindings

get_roles(namespace)
get_cluster_roles()
get_role_bindings(namespace)
get_cluster_role_bindings()

Check Service Account Permissions

get_service_accounts(namespace)

Common RBAC Patterns

PatternRisk LevelCheck
cluster-admin bindingCriticalget_cluster_role_bindings()
Wildcard verbs (*)HighReview role rules
secrets accessHighCheck get/list on secrets
pod/execHighAllows container access

See RBAC-PATTERNS.md for detailed patterns and remediation.

Policy Enforcement

Kyverno Policies

kyverno_policies_list_tool(namespace)
kyverno_clusterpolicies_list_tool()
kyverno_policy_get_tool(name, namespace)

OPA Gatekeeper

gatekeeper_constraints_list_tool()
gatekeeper_constraint_get_tool(kind, name)
gatekeeper_templates_list_tool()

Common Policies to Enforce

PolicyPurpose
Disallow privilegedPrevent root containers
Require resource limitsPrevent resource exhaustion
Restrict host namespacesIsolate from node
Require labelsEnsure metadata
Allowed registriesControl image sources

Secret Management

List Secrets

get_secrets(namespace)

Secret Best Practices

1. Use external secret managers (Vault, AWS SM) 2. Encrypt secrets at rest (EncryptionConfiguration) 3. Limit secret access via RBAC 4. Rotate secrets regularly

Network Policies

List Policies

get_network_policies(namespace)

Cilium Network Policies

cilium_policies_list_tool(namespace)
cilium_policy_get_tool(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

1. RBAC Audit

   get_cluster_role_bindings()
   get_roles(namespace)

2. Policy Compliance

   kyverno_clusterpolicies_list_tool()
   gatekeeper_constraints_list_tool()

3. Network Isolation

   get_network_policies(namespace)
   cilium_endpoints_list_tool(namespace)

4. Pod Security

   get_pods(namespace)
   describe_pod(name, namespace)

Multi-Cluster Security

Audit across clusters:

get_cluster_role_bindings(context="production")
get_cluster_role_bindings(context="staging")

Automated Audit Script

For comprehensive security audit, see scripts/audit-rbac.py.

Related Tools

  • RBAC: get_roles, get_cluster_roles, get_role_bindings
  • Policy: kyverno_*, gatekeeper_*
  • Network: get_network_policies, cilium_policies_*
  • Istio: istio_authorizationpolicies_list_tool, istio_peerauthentications_list_tool

Related Skills

  • k8s-policy - Policy management
  • k8s-cilium - Cilium network security

Related skills

Securityappsec

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.