Back to Home
weibaohui icon

kom

by weibaohui

Overview

Manages Kubernetes clusters and resources, providing an SDK-level wrapper for kubectl/client-go with Multi-Cluster Proxy (MCP) server capabilities.

Installation

Run Command
go build main.go && ./main

Environment Variables

  • KUBECONFIG
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_DEFAULT_REGION
  • AWS_ROLE_ARN
  • AWS_ROLE_SESSION_NAME

Security Notes

Critical security risks identified: 1. Weak default authentication: The 'main.go' example's MCP server uses 'username' from HTTP headers as an identifier, providing no actual authentication or authorization mechanism. This means any client can spoof a user. 2. Direct handling of AWS Access Keys/Secret Access Keys: EKS configuration directly accepts these sensitive credentials, which are then passed as environment variables to the 'aws' CLI for execution. 3. Highly privileged Kubernetes operations: The server exposes a wide range of powerful K8s operations (e.g., arbitrary file operations within Pods, node cordon/drain, creating privileged node/kubectl shells) via its API. Without a custom callback implementation for proper authorization (which is explicitly left to the user), these operations are unsecured. 4. SQL-like query capability: While useful, if not properly secured by authorization callbacks, this could allow unauthorized users to perform broad or sensitive queries/manipulations on K8s resources.

Similar Servers

Stats

Interest Score50
Security Score2
Cost ClassMedium
Avg Tokens500
Stars134
Forks30
Last Update2025-11-22

Tags

KubernetesOperationsMulti-ClusterClient-GoDevOps