smithery/rohitg00

k8s-security

Audit Kubernetes RBAC, enforce policies, and manage secrets. Use for security reviews, permission audits, policy enforcement with Kyverno/Gatekeeper, and secret management.

Installation

$ npx skills add smithery/rohitg00 --skill k8s-security

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery/rohitg00 · top by installs.

npx skills add smithery/rohitg00

Browse all from smithery/rohitg00

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
LicenseApache-2.0
More metadata
author
rohitg00
version
1.0.0
tools
10
category
security

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 4,664 B
  • docs SUMMARY.md 192 B

History

  1. First recorded snapshot · 0 installs

SKILL.md

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

Priority Rule Impact Tools
1 Check cluster-admin bindings first CRITICAL getclusterrole_bindings
2 Audit secrets access permissions CRITICAL Review role rules
3 Verify network isolation HIGH getnetworkpolicies
4 Check policy compliance HIGH kyverno, gatekeeper
5 Review pod security contexts MEDIUM describe_pod

Quick Reference

Task Tool Example
List roles get_roles get_roles(namespace)
Cluster roles getclusterroles getclusterroles()
Role bindings getrolebindings getrolebindings(namespace)
Service accounts getserviceaccounts getserviceaccounts(namespace)
Kyverno policies kyvernoclusterpolicieslist_tool kyvernoclusterpolicieslist_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

Pattern Risk Level Check
cluster-admin binding Critical getclusterrole_bindings()
Wildcard verbs (*) High Review role rules
secrets access High Check get/list on secrets
pod/exec High Allows container access

See [RBAC-PATTERNS.md](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

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

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

``python getclusterrolebindings() getroles(namespace) ``

  1. Policy Compliance

``python kyvernoclusterpolicieslisttool() gatekeeperconstraintslisttool() ``

  1. Network Isolation

``python getnetworkpolicies(namespace) ciliumendpointslist_tool(namespace) ``

  1. Pod Security

``python getpods(namespace) describepod(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](scripts/audit-rbac.py).

Related Tools

  • RBAC: getroles, getclusterroles, getrole_bindings
  • Policy: kyverno, gatekeeper
  • Network: getnetworkpolicies, ciliumpolicies*
  • Istio: istioauthorizationpolicieslisttool, istiopeerauthenticationslisttool

Related Skills

  • [k8s-policy](../k8s-policy/SKILL.md) - Policy management
  • [k8s-cilium](../k8s-cilium/SKILL.md) - Cilium network security