Back to skill

Security audit

huawei-cloud-cost-estimation

Security checks for vulnerabilities and agentic risk

Overview

The skill is a disclosed Huawei Cloud pricing and provisioning helper with strong confirmation gates, though users should be careful with the manual CLI installation and cloud permissions.

Install only if you intend to let an agent help price or create Huawei Cloud resources. Use a least-privilege IAM user, verify any hcloud installer or binary through Huawei's official channels before placing it in PATH, and do not approve creation commands unless the account, region, resource, billing mode, and price or unknown-price warning are clear.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
references/cli-installation.md:29
Finding

Unverified Mutable CLI Downloads Allow Supply-Chain Code Execution

Content
View full analysis

Vulnerability Details

File Location: references/cli-installation.md, lines 29-41 and 49-89
Vulnerability Type: Unverified third-party installer and binary downloads from a mutable latest path
Risk Level: Medium

Vulnerable Code

Lines 29-41:

bash
BASE=https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest
curl -sSL "$BASE/hcloud_install.sh" -o ./hcloud_install.sh
# Review the script source and contents before execution:
less ./hcloud_install.sh
bash ./hcloud_install.sh

The non-interactive variant is:

bash
BASE=https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest
curl -sSL "$BASE/hcloud_install.sh" -o ./hcloud_install.sh
# Review the script source and contents before execution:
less ./hcloud_install.sh
bash ./hcloud_install.sh -y

Lines 49-89 contain equivalent unverified binary downloads for supported platforms:

bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version
bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-arm64.tar.gz"
tar -zxvf huaweicloud-cli-linux-arm64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version
bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-amd64.tar.gz"
tar -zxvf huaweicloud-cli-mac-amd64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version
bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-mac-arm64.tar.gz"
tar -zxvf huaweicloud-cli-mac-arm64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version
powershell
$url = "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-c
...[truncated 3086 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace mutable latest URLs with an explicitly supported and immutable version.
  2. Publish SHA-256 or stronger checksums through a separately authenticated release channel and require users to verify them before extraction or execution.
  3. Prefer vendor-signed packages or binaries and document mandatory publisher-signature verification.
  4. For installer scripts, download the script and detached signature, verify the signature against a pinned vendor key, and only then execute it.
  5. Remove or strongly discourage the unattended bash ./hcloud_install.sh -y workflow unless integrity verification has already succeeded.
  6. Verify archives before extraction and verify the extracted executable before placing it in /usr/local/bin or a system PATH.
  7. Use a user-local installation directory where possible, avoiding elevated installation privileges.
  8. Document the expected version and verified digest so users can compare hcloud version and the artifact hash against known-good values.
  9. Retain the existing restriction that the Agent must not download or install the dependency on the user's behalf.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (13)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The invocation description is broad enough to attract requests for real cloud resource creation and provisioning, which are high-impact actions with cost and infrastructure consequences. Although the body adds safety gates, overly generic triggers can cause the skill to activate in ambiguous contexts and steer users toward sensitive operations when a narrower routing policy would be safer.

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 · references/cli-installation.md (reported line 51)May include surrounding context.

bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version

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 · references/cli-installation.md (reported line 60)May include surrounding context.

bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version

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 · references/cli-installation.md (reported line 69)May include surrounding context.

bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version

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 · references/cli-installation.md (reported line 78)May include surrounding context.

bash
curl -LO "https://cn-north-4-hdn-koocli.obs.cn-north-4.myhuaweicloud.com/cli/latest/huaweicloud-cli-linux-amd64.tar.gz"
tar -zxvf huaweicloud-cli-linux-amd64.tar.gz
sudo mv hcloud /usr/local/bin/
hcloud version

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 · references/cli-installation.md (reported line 159)May include surrounding context.

md
| 问题 | 原因 | 解决方案 |
| --- | --- | --- |
| `hcloud: command not found` | 未加入PATH | `sudo mv hcloud /usr/local/bin/` |
| `Permission denied` | 无执行权限 | `chmod +x /usr/local/bin/hcloud` |
| 下载 404 | 使用了旧域名/旧包名 | 改用 `cn-north-4-hdn-koocli` 域名与 `huaweicloud-cli-*` 包名 |
| SSL证书错误 | 系统CA证书过旧 | 更新ca-certificates包 |

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file documents whitelist commands that create cloud resources, place orders, and open paid services, including servers, databases, firewalls, and storage. Although billing fields are shown, there is no explicit caution to users that invoking these commands can provision real infrastructure, incur charges, or alter the target environment, which matches the missing-warning criterion for markdown files affecting user data or system integrity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains user-facing operational instructions exclusively in Chinese, and there is no indication that users may opt into another language or that the skill is restricted to a Chinese-language audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description at L06 is entirely in Chinese and provides no indication that users may choose another language or that the locale is intentionally restricted. This creates a natural-language policy concern because the file imposes a language assumption without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The metadata sets language: en, and the file does not indicate that the user can choose another language or that English is optional. This can violate language/locale policy when a skill forces a specific language without user opt-in or justification in the instructions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document content, headings, and instructions are all presented only in Chinese, and there is no surrounding text offering an alternate language or indicating that the locale is intentionally user-selected. Under the language/locale policy criterion, forcing a single language without opt-in can be considered a natural-language policy violation unless justified or explicitly documented.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The entire skill document is written as mandatory Chinese operational guidance and does not indicate any user opt-in, alternate language support, or locale choice. Under the policy rule, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This YAML manifest-like file applies to the vague-trigger category. The description says the ontology is shared by period and on-demand models and that command discipline is maintained elsewhere, but it provides no concrete invocation boundaries, allowed triggers, or exclusion conditions in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.