Back to skill

Security audit

huawei-cloud-cli-guidance

Security checks for vulnerabilities and agentic risk

Overview

This cloud CLI guide needs review because its execution boundaries conflict and its examples include unsafe root logins and potentially destructive cleanup.

Keep this skill advisory until its execution rules are consistent. Use least-privilege credentials, verified SSH host keys, and separately approved resource changes. Confirm backups and exact disks before cleanup; preserve profiles unless explicitly purging them. Verify installers and container provenance before execution, and redact diagnostic logs. The scanner's partial references were independently inspected, but external payloads were not; this review found unsafe guidance rather than evidence of intentional malicious behavior.

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
references/common-workflows.md
Finding

Password-based root SSH disables server identity verification

Content
View full analysis

Impact

The impersonating SSH server can capture the supplied root password and return fabricated diagnostic results. If the legitimate instance permits password login and is reachable, the stolen password can enable root access.

Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
Findings (58)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The supplied workflows perform generic remote server administration and do not invoke KooCLI, Huawei Cloud APIs, or IAM configuration. Although a target host could be a Huawei Cloud instance, no such connection is established in the code, and inspecting its operating system over root SSH is materially different from the declared cloud CLI guidance. The password and IP are placeholders, so the chunk demonstrates these capabilities rather than identifying a concrete target.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
name: huawei-cloud-cli-guidance
description: >-
  Provides guidance for Huawei Cloud KooCLI command-line tool operations.
  Covers KooCLI installation, IAM authentication configuration, access credential configuration, command construction, common error troubleshooting.
  Use this skill when users ask about any cloud-related services or wants to operate Huawei Cloud services from the terminal.
  Triggers: Huawei Cloud, huaweiyun, "华为云","华为cli", "命令行", KooCLI, hcloud, huaweiyunCLI, Huawei Cloud command line, OBS, ECS, VPC, "云", yun, huaweiyun tool, huawei tool, "华为云工具", "云工具", "工具"

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The installation command immediately executes a downloaded script from a mutable latest URL without verifying its integrity or authenticity beyond HTTPS. Installation is within the skill's purpose and the URL appears vendor-related, but compromise of the distribution path could still result in arbitrary code execution with the invoking user's privileges.

Content

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

bash
# Universal for all platforms
curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh

# Non-interactive installation
curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The non-interactive installation variant executes an unverified script fetched from a mutable latest URL. Its -y option further removes opportunities to review installation prompts, increasing the consequences of a compromised installer.

Content

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

curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh

Non-interactive installation

curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y

text
##### After installation completes, check if local installation was successful.
Important: No additional operations allowed!!! Any file content changes must obtain user permission.

Operational instructions contradict the explicit guidance-only, no-execution boundary.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The source explicitly promises guidance-only behavior but subsequently instructs the agent to execute help queries, make API calls, and print their results. With Bash and KooCLI allowed, these contradictory instructions can cause execution beyond the promised boundary, including live cloud access and unintended disclosure of resource information.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
See `./references/credential-security.md` for the complete credential security best practices (plaintext AK/SK prohibition, shell history hygiene, profile or en

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `./references/credential-security.md` — Credential security best practices

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- `./references/core-commands.md` — Core commands

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/cli-troubleshooting.md (reported line 247)May include surrounding context.

hcloud --help

text

### Step 3: Enable Debug Mode
```bash
# Enable detailed logs
hcloud <SERVICE> <OPERATION> --debug --cli-region=cn-north-4

The cleanup workflow deletes attached cloud disks without warning about permanent data loss.

High
Category
Output Handling
Confidence
97% confidence
Finding

The cleanup recipe includes --delete_volume=true, making deletion of attached storage part of the routine instance-removal command. Although the comment mentions releasing disks, it does not clearly explain permanent data loss or require backup verification and explicit consent for deleting the data.

Content

No source excerpt is available for this finding.

SSH workflows disable host-key verification without disclosing the security implications.

High
Category
Output Handling
Confidence
99% confidence
Finding

The SSH examples disable strict host-key checking while using password-based root authentication. This permits unverified first connections, enabling an active network attacker to impersonate the host, capture the root password, and falsify diagnostic output.

Content

No source excerpt is available for this finding.

Privileged Container / Container Escape

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Potential security issue detected. Manual review is recommended.

Content

Scanner excerpt · references/core-commands.md (reported line 214)May include surrounding context.

md
hcloud EVS AttachVolume \
  --volume_id=vol-12345678 \
  --server_id=i-12345678 \
  --device=/dev/vdb \
  --cli-region=cn-north-4

# Detach volume

Instruction Override

High
Category
Prompt Injection
Confidence
70% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · references/core-commands.md (reported line 351)May include surrounding context.

4. Use Debug Mode for Troubleshooting

bash
# Enable debug mode to see request/response details
hcloud ECS ListServersDetails --cli-region=cn-north-4 --debug

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The command immediately executes an installer downloaded from a mutable 'latest' URL without documented signature or trusted-digest verification. HTTPS protects transport but does not prevent a compromised distribution endpoint from supplying code that runs with the user's privileges.

Content

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

One-click Installation

bash
# Download and run official installation script (interactive)
curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh

# Non-interactive installation (skip confirmation)
curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The non-interactive variant executes the same unverified, mutable remote installer. Skipping installer prompts does not authenticate the downloaded code and makes unattended propagation of compromised content possible.

Content

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

curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh

Non-interactive installation (skip confirmation)

curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y

text

### Verify Installation

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The Docker build executes a mutable remote script without documented integrity verification, and it runs as root inside the build environment. A compromised installer could tamper with the resulting image and later access credentials supplied to containers; this does not by itself imply host-root access.

Content

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

dockerfile
FROM ubuntu:latest
RUN apt-get update -y && apt-get install curl -y
RUN curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y
WORKDIR /workspace
ENTRYPOINT ["/usr/local/bin/hcloud"]

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

Installing into a user-owned directory reduces privilege exposure but still executes an unverified remote script. A compromised script would retain access to the user's files and potentially cloud credentials.

Content

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

sudo bash ./hcloud_install.sh

Or install to user directory

curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -d ~/.local/bin

text

#### Command Not Found

External Script Fetching

High
Category
Supply Chain
Confidence
97% confidence
Finding

The reinstall path again executes an unverified installer from a mutable 'latest' endpoint. Repeating this during maintenance introduces another opportunity for compromised distribution content to execute on a cloud administrator's workstation.

Content

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

hcloud update

Or reinstall latest version

curl -sSL https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/hcloud_install.sh -o ./hcloud_install.sh && bash ./hcloud_install.sh -y

text

### Uninstall KooCLI

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Uninstall KooCLI

bash
# Linux/macOS manual uninstallation:
sudo rm -f /usr/local/bin/hcloud
sudo rm -rf /usr/local/hcloud/
rm -rf ~/.hcloud/

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

bash
# Linux/macOS manual uninstallation:
sudo rm -f /usr/local/bin/hcloud
sudo rm -rf /usr/local/hcloud/
rm -rf ~/.hcloud/

# Windows manual uninstallation:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

bash
# Linux/macOS manual uninstallation:
sudo rm -f /usr/local/bin/hcloud
sudo rm -rf /usr/local/hcloud/
rm -rf ~/.hcloud/

# Windows manual uninstallation:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

This command forcibly deletes the user's entire KooCLI configuration rather than only uninstalling the executable. Although relevant to a full purge, presenting it as routine uninstallation without a specific warning or confirmation can cause unintended loss of profiles and credentials.

Content

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

md
# Linux/macOS manual uninstallation:
sudo rm -f /usr/local/bin/hcloud
sudo rm -rf /usr/local/hcloud/
rm -rf ~/.hcloud/

# Windows manual uninstallation:
# 1. Delete hcloud.exe file

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
# Linux/macOS manual uninstallation:
sudo rm -f /usr/local/bin/hcloud
sudo rm -rf /usr/local/hcloud/
rm -rf ~/.hcloud/

# Windows manual uninstallation:
# 1. Delete hcloud.exe file

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Clean Cache

bash
# Clean KooCLI cache
rm -rf ~/.hcloud/cache/

# Clean downloaded files
rm -f hcloud_install.sh huaweicloud-cli-*.tar.gz huaweicloud-cli-*.zip

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

Clean Cache

bash
# Clean KooCLI cache
rm -rf ~/.hcloud/cache/

# Clean downloaded files
rm -f hcloud_install.sh huaweicloud-cli-*.tar.gz huaweicloud-cli-*.zip