Back to skill

Security audit

huawei-cloud-billing-scout

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent read-only Huawei Cloud billing helper, with install and credential cautions users should review.

Install KooCLI only from Huawei Cloud's official source, prefer a pinned or verified download when available, and grant only read-only BSS permissions to an IAM user rather than using a main-account credential. Do not paste AK/SK secrets into chat; use an existing local profile or temporary environment variables and clear them afterward.

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:24
Finding
Mutable Remote Installer Executed Without Cryptographic Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `references/cli-installation.md`, lines 24–40 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```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 content before execution: less ./hcloud_install.sh bash ./hcloud_install.sh ``` The document also provides a non-interactive variant: ```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 content before execution: less ./hcloud_install.sh bash ./hcloud_install.sh -y ``` ### Technical Analysis The installation instructions retrieve a shell script from a mutable `latest` URL and subsequently execute it. They do not pin a specific KooCLI release or verify an official checksum or cryptographic signature. HTTPS protects the download in transit under normal conditions, but it does not establish that the retrieved file is the exact artifact reviewed or intended by the project. The effective installer can change after this Skill has been audited because the URL points to a mutable location. A compromised distribution endpoint, storage account, DNS/TLS trust path, or release process could therefore replace the installer with attacker-controlled code. The recommendation to inspect the script manually with `less` is helpful but is not a reliable integrity control. Complex or obfuscated behavior can evade visual review, and the non-interactive `-y` variant can reduce opportunities to identify unexpected actions during installation. The instructions explicitly state that the user, rather than the Agent, must perform the download and installation. This limits automatic exploitation through the Skill itself, but users following the documented procedure remain exposed to supply-ch ...[truncated 1459 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace the mutable `latest` URL with a pinned, explicitly approved KooCLI version. 2. Publish the expected SHA-256 or stronger digest through an independent trusted channel and verify it before execution, for example: ```bash printf '%s %s\n' '<official-sha256>' 'hcloud_install.sh' | sha256sum --check - ``` 3. Prefer vendor-provided cryptographic signatures and verify them against a pinned, independently authenticated signing key. 4. Stop installation immediately if checksum or signature verification fails. 5. Prefer a verified operating-system package manager or another installation channel that provides package signing and version pinning. 6. Preserve manual source review as defense in depth, but do not treat it as a replacement for cryptographic verification. 7. Avoid the non-interactive `-y` option unless the artifact has already passed integrity and authenticity checks. 8. Execute the installer with the least privileges required, and review any privilege-escalation request before granting it. 9. Document the expected version, checksum, signer identity, and verification procedure together so users can validate the exact reviewed artifact. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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 (8)

Ae1

High
Category
analysis-evasion
Content
`SKILL.md` defines behavior; `references/semantic/catalog.yml` defines entry points and required
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```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
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```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
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```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
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
```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
```
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| 问题 | 原因 | 解决方案 |
| --- | --- | --- |
| `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包 |
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The document title and all operational guidance are written exclusively in Chinese, and there is no natural-language indication that users may choose another language or locale. This can violate a language/locale policy when a skill effectively forces one language without user opt-in.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill manifest claims it refuses refund-related requests, but the ontology explicitly supports refund evidence via BSS/ShowRefundOrderDetails. This creates a policy-to-capability mismatch: an agent or downstream planner may still discover and use the refund inspection path, exposing refund-related data despite the advertised restriction. In a billing skill, this inconsistency is more dangerous because refund records are highly relevant and likely to be selected during reconciliation or order-evidence workflows.

Static analysis

No suspicious patterns detected.