Back to skill

Security audit

huawei-cloud-kubectl-cce-installer

Security checks for vulnerabilities and agentic risk

Overview

The skill supports read-only cluster queries, but automatically disables a connection security check after certificate errors.

Before using this skill, remove the automatic TLS-bypass retry and resolve certificate trust errors. Reconcile the conflicting cluster-wide query rules, use narrowly scoped read-only credentials, and approve the exact installation directory and any replacement. Review the downloaded plugin separately; its implementation is not bundled.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md
Finding

Automatic certificate-error retry bypasses upstream server authentication

Content
View full analysis

Impact

A network intermediary can tamper with resource-query responses and compromise the integrity of the information returned to the user. Confidential request data sent over the affected upstream connection may also be exposed. The external plugin implementation is not included, so the exact credentials or headers carried on that connection were not verified.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The script detects whether kubectl-cce exists, but its installation branch runs when either PLUGIN_PRESENT is false or REINSTALL_PLUGIN is true. Thus, --execute --reinstall can overwrite an existing plugin, potentially changing its version to the pinned v0.2.1. Although prerequisite repair is broadly declared, this behavior contradicts the narrower instruction to install only when missing. Downloads, source builds, and local verification otherwise support the declared prerequisite-management purpose.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 25)May include surrounding context.

md
- For cluster-scoped resources such as `node`, `namespace`, `persistentvolume`, and `storageclass`, require an exact resource name. Do not list every
  instance.
- Never run `apply`, `create`, `delete`, `edit`, `patch`, `replace`, `scale`, `rollout`, `cordon`, `drain`, or `exec`.
- Do not print credentials, tokens, kubeconfig content, or Secret data.

## Prerequisites And Required Context

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/acceptance-criteria.md (reported line 27)May include surrounding context.

md
## Safety and Documentation

- No cloud resources, Kubernetes resources, credentials, tokens, kubeconfig files, or Secret data are created, changed, printed, or stored by the skill.
- R1 installation actions require a preview and explicit user confirmation before `--execute`.
- `SKILL.md` documents triggers, configurable parameters, confirmation requirements, fallback behavior, and verification commands.
- `references/installation.md` documents local dependencies, installer commands, source fallback, Windows installation, confirmation, and troubleshooting.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/installation.md (reported line 11)May include surrounding context.

md
- Source-build fallback additionally requires `git` and Go.
- The selected `--bin-dir` must be writable. `/usr/local/bin` commonly requires elevated local permission.
- Network operations use these defaults: 10-second connection timeout, 300-second download timeout, 600-second source-clone timeout, and 900-second build timeout.
- Installation does not need Huawei Cloud credentials. Never print or store credentials, tokens, or kubeconfig content.

## Installer Commands

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/plugin-usage.md (reported line 17)May include surrounding context.

md
Cluster-wide reads are allowed only when a tool explicitly requires a read-only aggregation or inventory, such as default Warning Event collection,
Pod/Service/Ingress metric aggregation, LogConfig discovery, or node inventory. In those cases, query only the required resource type and apply an
available namespace, label selector, field selector, or result limit to reduce returned data. For cluster-scoped resources, prefer an exact resource
name unless the tool explicitly requires inventory. Do not use mutation commands or print Secret data, credentials, tokens, or kubeconfig contents.

## Credential Options

The TLS-error retry disables certificate validation without warning the user about the security implications.

High
Category
Output Handling
Confidence
99% confidence
Finding

The retry instruction turns off upstream certificate validation precisely when endpoint authenticity cannot be established. An attacker able to intercept that connection could exploit the retry to observe sensitive resource data or supply fabricated responses; restricting queries to read-only operations does not prevent this.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 56)May include surrounding context.

bash
   bash scripts/install_kubectl_cce.sh --bin-dir <directory>
   sudo bash scripts/install_kubectl_cce.sh --execute --bin-dir <directory>
  1. Verify installation with kubectl version --client and kubectl plugin list, then run only the requested read-only resource query.

Automatic TLS-verification bypass is instructed without warning the user about the security impact.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The skill instructs the agent to disable upstream certificate validation automatically after an x509 error, which could itself indicate interception. This weakens authentication of the affected TLS connection and can expose sensitive Kubernetes responses or allow falsified results despite the read-only command restrictions.

Content

No source excerpt is available for this finding.

The --reinstall option replaces kubectl-cce even when it is already installed, contrary to the manifest's missing-only installation constraint.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The manifest explicitly states that kubectl and kubectl-cce are installed only when missing locally. At L252, REINSTALL_PLUGIN bypasses the presence check, allowing the subsequent download or source-build paths to overwrite an existing plugin with version 0.2.1, potentially downgrading a working installation.

Content

No source excerpt is available for this finding.