Back to skill

Security audit

huawei-cloud-hss-list

Security checks for vulnerabilities and agentic risk

Overview

This host-listing skill needs review because it requires an extra telemetry tool whose reporting behavior is insufficiently explained.

Review the telemetry tool separately before installing, including its exact payload, destination and release verification. Prefer optional telemetry setup. If proceeding, use credentials limited to HSS host listing and clear the test executable overrides. The documented SKILL_QUALITY_REPORT=0 switch does not prevent installing or executing the wrapper, and its implementation was unavailable for inspection.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
Findings (19)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Requiring an unrelated executable to be installed persistently broadens the local effects of a nominally read-only cloud query. The dependency is mentioned in the documentation, so this is not wholly concealed behavior, but mandatory installation still adds avoidable executable-supply-chain exposure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The mandatory telemetry dependency expands an inventory query into downloading, installing, and running additional software with the agent's privileges. Although the body discloses this dependency, the read-only HSS purpose does not require it, and making it mandatory introduces an unnecessary supply-chain and data-handling trust boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The security-relevant mismatch is making installation and execution of a telemetry wrapper a prerequisite for HSS listing. Upgrades are explicitly manual rather than automatic, and the dependency is documented, but neither fact removes the unnecessary trust placed in auxiliary executable code.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The highlighted curl response is parsed as JSON, not executed as Python, so the matched fragment is not direct script execution. However, the installer uses that mutable manifest to select both an executable archive and its expected checksum without independent release authentication or a download-origin restriction; compromise of the manifest can therefore result in malicious executable installation and later execution.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 28)May include surrounding context.

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"

manifest="$(curl -fsSL --connect-timeout 5 --max-time 20 "${API_URL}")"
v="$(printf '%s' "$manifest" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])')"
case "$(uname -s)" in
    Linux) ;;

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, 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.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
70% confidence
Finding

Shadow Command Trigger: description clause 'Supports --region override and readable modes --json (raw response array) and --names-only (compact host-name list)' conflicts with built-in command 'list'

Content

No source excerpt is available for this finding.

The execution workflow adds automatic telemetry and tool installation to a skill described as a strictly read-only HSS inventory query.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

Automatic telemetry and installation add network destinations, local mutations, and another executable to a security-inventory workflow. The provided text does not establish what telemetry contains, but requiring the wrapper without affirmative consent creates an unnecessary data-handling and supply-chain exposure.

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-guide.md (reported line 16)May include surrounding context.

Linux/macOS

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

text

The guide mandates an undeclared telemetry wrapper and its installation for all HSS CLI queries.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The guide makes a telemetry-producing wrapper mandatory and forbids an otherwise sufficient direct HSS query. This needlessly places an additional executable and reporting path in a credential-bearing workflow; the provided guide does not specify the reported data or demonstrate credential exfiltration.

Content

No source excerpt is available for this finding.

The error-output path specifies Chinese error hints without user language choice or a documented justification.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

The diagram explicitly specifies Chinese for error hints, fixing the language of user-facing output. The file provides neither user opt-in nor a documented reason for this language constraint.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/ensure_cli.sh (reported line 89)May include surrounding context.

sh
echo "警告: 解压失败或 tar 包含不安全条目, 拒绝安装" >&2
        return 1
    fi
    mkdir -p ~/.local/bin/skill-quality-cli.d || { echo "警告: 创建安装目录失败" >&2; return 1; }
    [ -f "${tmp}/skill-quality-cli" ] || { echo "警告: 安装包内容缺失(skill-quality-cli)" >&2; return 1; }
    # 主二进制: 复制/可执行位失败必须显式失败(不再静默吞错)
    cp "${tmp}/skill-quality-cli" ~/.local/bin/skill-quality-cli || { echo "警告: 复制 skill-quality-cli 失败" >&2; return 1; }

The skill installs an unrelated quality CLI despite being scoped to listing HSS hosts.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

This readiness helper automatically installs persistent executable components selected by a mutable remote manifest, despite those components being unnecessary for HSS inventory. SHA256 checking and archive-path checks are useful protections, but a checksum supplied by the same manifest does not protect against a compromised release manifest distributing malicious code.

Content

No source excerpt is available for this finding.

Installs an unrelated skill-quality CLI outside the HSS listing skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The script fetches a release manifest and downloads an external package, then installs executable files and supporting modules into ~/.local/bin. The declared skill only lists HSS hosts through KooCLI or the HSS SDK; installing skill-quality-cli is unrelated to either execution path and introduces persistent local changes. Manual invocation and checksum verification do not make this additional capability necessary for the stated purpose.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · scripts/install_cli.sh (reported line 78)May include surrounding context.

sh
echo "错误: 解压失败或 tar 包含不安全条目, 拒绝安装" >&2
        exit 1
    fi
mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${tmp}/skill-quality-cli" ~/.local/bin/skill-quality-cli || { echo "错误: 复制 skill-quality-cli 失败" >&2; exit 1; }
chmod +x ~/.local/bin/skill-quality-cli || { echo "错误: 设置可执行位失败" >&2; exit 1; }
if [ -f "${tmp}/skill-quality-cli.bin" ]; then

Environment-controlled executable and argument overrides bypass the promised read-only execution guard.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The write-intent and operation guards inspect command-line inputs, but execution also consumes unchecked environment overrides that can replace the program entirely. Consequently, the promised read-only restriction is not enforced at the execution boundary: malicious inherited configuration could run arbitrary code, access cloud credentials, or perform writes permitted by those credentials.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/list_hss.py (reported line 231)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=120, universal_newlines=True,
        )

Tainted flow: 'cmd' from os.environ.get (line 225, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
90% confidence
Finding

HSS_LIST_HCLOUD_BIN selects an arbitrary executable, while HSS_LIST_HCLOUD_ARGS supplies unchecked leading arguments, allowing an environment-controlling attacker to substitute an interpreter or wrapper that executes code with the agent's privileges and credential access. This is conditional on control of the process environment—not ordinary host-filter input—and duplicates the underlying issue in SDI-1.

Content

Scanner excerpt · scripts/list_hss.py (reported line 231)May include surrounding context.

python
cmd.extend(extra)
    cmd.extend(argv)
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=120, universal_newlines=True,
        )

The workflow requires Chinese error messages without offering a language choice or justifying the restriction.

Low
Category
Output Handling
Confidence
96% confidence
Finding

The workflow explicitly specifies Chinese error hints, reinforced by the language requirement at lines 74–77. The skill provides no user opt-in, language selection, or documented justification for requiring Chinese regardless of the user's language.

Content

No source excerpt is available for this finding.

Acceptance criteria require Chinese-language error and empty-result messages without user opt-in.

Low
Category
Output Handling
Confidence
97% confidence
Finding

These criteria require specific Chinese messages for permission errors and empty regions, imposing an output language regardless of the user's preference. The file provides neither a language choice nor a documented justification for this restriction.

Content

No source excerpt is available for this finding.