Back to skill

Security audit

huawei-cloud-vpc-list

Security checks for vulnerabilities and agentic risk

Overview

This VPC inventory skill needs review because its instructions require an automatically installed telemetry wrapper without explaining what data it reports or where.

Before installing, seek an optional telemetry workflow, disclosure of reported fields and destinations, and a reviewed, pinned wrapper release. The documented SKILL_QUALITY_REPORT=0 setting does not remove the wrapper requirement. Use narrowly scoped read-only cloud credentials and leave executable-testing overrides unset.

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
  • 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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (14)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Automatic installation of unrelated executable software introduces supply-chain and local execution risks beyond the requested read-only VPC operation. This overlaps the preceding finding, and although installation is documented, the specific claims about overwriting files under ~/.local/bin cannot be verified without the installer source.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The document explicitly introduces automatic installation of an unrelated telemetry CLI and requires it to wrap cloud commands, expanding an inventory request into third-party software execution. Compromise of that dependency could expose credentials accessible to the process or alter command behavior; the supplied file does not independently verify the reported manifest endpoint or installation paths.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The underlying concern is valid because automatic telemetry collection and a mandatory third-party command wrapper add a trust boundary unrelated to VPC listing, potentially exposing inventory or credential-profile information. However, the finding overstates the mismatch: the dependency is disclosed in the document, and upgrades are described as manual rather than automatic; actual telemetry contents and destinations remain unverified.

Content

No source excerpt is available for this finding.

The skill automatically downloads and persistently installs an unrelated skill-quality-cli tool.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked without an existing usable installation, this script downloads a mutable latest release and persistently installs executable code unrelated to the stated read-only VPC-listing task, without an explicit consent step. HTTPS, mandatory SHA256 verification, and archive checks reduce risk, but the download URL and checksum share the same manifest trust source; compromise of that source could install attacker-controlled code for execution with the user's permissions. The supplied script does not establish malicious intent or automatically execute the newly downloaded binary.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The manifest request downloads JSON rather than executing a script, but the subsequent workflow installs executable content selected by that mutable remote manifest. Its SHA-256 check detects corruption but cannot protect against a compromised manifest publisher supplying both a malicious package and its matching hash; no independently trusted signature or pinned digest is checked. Manual invocation and HTTPS reduce exposure, but later execution of a substituted CLI could compromise the user's account and accessible cloud credentials.

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.

The skill requires an unrelated telemetry CLI and automatic installation despite its VPC-listing-only purpose.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The skill makes an unrelated telemetry CLI mandatory and provides automatic installation despite the user's task requiring only cloud inventory access. Running this wrapper around authenticated cloud commands gives additional software access to command execution and potentially sensitive results; an opt-out reporting variable does not eliminate that execution boundary.

Content

No source excerpt is available for this finding.

The guide requires an unrelated telemetry CLI and its installation for all VPC listing commands.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The guide makes an unrelated telemetry executable and its automatic installation mandatory for a read-only VPC listing task, introducing an unnecessary code-execution and supply-chain trust boundary. A compromised installer or wrapper could access credentials available to its process, inspect VPC output, or alter the invoked command; the skill's read-only intent guard would not constrain that executable. The telemetry-disable option does not remove this execution dependency, although the provided content does not establish actual data exfiltration or malicious intent.

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; }

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

Installs an unrelated skill-quality CLI despite the skill's VPC-listing-only purpose.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

L26–L48 fetch a quality-CLI release manifest and download its package; L78–L88 persist executable files and supporting modules under ~/.local/bin. Installing skill-quality-cli is unrelated to listing VPCs and is neither the declared KooCLI dependency nor the official SDK fallback. Manual invocation and checksum verification do not justify this additional capability under the stated purpose.

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_vpc.py (reported line 225)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 219, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
87% confidence
Finding

VPC_LIST_HCLOUD_BIN selects an unrestricted executable, while VPC_LIST_HCLOUD_ARGS supplies arguments that bypass the write-intent guard. If an attacker can influence these environment settings without otherwise controlling execution, they can substitute a program or interpreter that runs with the skill's privileges and inherited cloud credentials, defeating the read-only restriction. These documented testing hooks are not evidence of malicious intent, and exploitability depends on an environment-configuration trust boundary.

Content

Scanner excerpt · scripts/list_vpc.py (reported line 225)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,
        )

Acceptance criteria require Chinese-language user-facing messages without a language choice or documented locale justification.

Low
Category
Output Handling
Confidence
92% confidence
Finding

The empty-list and permission-error criteria prescribe exact Chinese messages, making Chinese output a requirement for these cases. The file provides no user opt-in, language-selection mechanism, or region-specific justification for this constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.