T09 · Insecure Skill Coding Practices
- Location
SKILL.md:125- Finding
Kubeconfig credentials exposed through command-line arguments
- Content
View full analysis
--cli-region=cn-north-4 ``` Equivalent instructions appear in the referenced registration and API guide documents: ```bash hcloud UCS RegisterCluster --apiVersion=v1 --kind=Cluster --metadata.name=datacenter-k8s --spec.category=onpremise --spec.provider=self_managed --spec.type=Kubernetes --spec.manageType=discrete --spec.country=CN --spec.city=110000 --metadata.annotations.kubeconfig= --cli-region=cn-north-4 ``` ### Technical Analysis A Kubernetes kubeconfig can contain bearer tokens, client certificates, and private client keys. The documented workflow instructs the user to substitute the complete kubeconfig content directly into the `--metadata.annotations.kubeconfig` command-line argument. When sensitive material is supplied through a process argument, it may be exposed through: - Interactive shell history - Process inspection interfaces and process-monitoring tools - Terminal session recording - System auditing or endpoint monitoring - CI/CD command logs - Error reports that capture the executed command - Wrapper scripts that log argument vectors Quoting the kubeconfig does not address this issue because quoting only affects shell parsing; the resulting secret still becomes part of the process argument vector. ### Attack Path 1. A user follows the documented self-managed cluster regist ...[truncated 1522 chars]- Remediation
View remediation
