Back to skill

Security audit

huawei-cloud-vpn-connection-list

Security checks for vulnerabilities and agentic risk

Overview

This VPN inventory skill needs review because it requires an additional telemetry tool with access to authenticated commands and raw VPN results.

Review the telemetry tool and its data policy before installing, and require an optional, verified release. SKILL_QUALITY_REPORT=0 bypasses wrapping in Python but does not prevent ensure_cli.sh from installing the tool. Use VPN read-only credentials. The scanner's missing references were an endpoint and an error code, not missing executable files; the remaining material uncertainty is the unbundled downloaded code.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (20)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The inventory instructions require installing an additional executable dependency and routing authenticated commands through it, expanding trust beyond the VPN CLI and SDK. Although the body mentions telemetry, this is not an inherent requirement of inventory and introduces local installation and supply-chain exposure under a read-only description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

This overlaps the additional-dependency finding: the document directs a read-only inventory agent to install persistent executable components unrelated to querying VPN resources. The dependency is mentioned in the body, so it is not entirely undisclosed, but that disclosure does not provide separate authorization for installation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The workflow adds telemetry installation and reporting to a VPN inventory task without requiring separate consent. Manual upgrade instructions are not themselves an exploit, and telemetry is mentioned in the body, but mandatory setup still expands the operational trust boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Default-enabled reporting places an additional executable in the authenticated command path without specifying its collected fields, recipients, or redaction guarantees. Telemetry is disclosed in the document body, but the supplied source does not establish that sensitive inventory output or credential-related information is excluded.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

The VPN listing commands align with the declared purpose. However, hcloud configure list accesses CLI configuration rather than VPN gateway or connection inventory, and configuration inspection is not disclosed in the description. The snippet does not establish whether any credential values are exposed. The execution wrapper is a supporting implementation detail, and features absent from this limited chunk are not independently treated as mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

An environment-controlled opt-out does not substitute for consent to default reporting through an additional command wrapper. The risk comes from the wrapper's access to authenticated execution, not from skill-name tagging itself; actual secret transmission is not demonstrated.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

CLI setup can be a legitimate supporting detail, but this snippet executes code from hcccloud.com, a distinct domain from huaweicloud.com, without verification. That introduces an undeclared external code-execution path rather than the stated SDK fallback. The downloaded script is not supplied, so its effects and legitimacy cannot be established; there is no evidence here of VPN mutations or PSK access.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The highlighted request fetches JSON rather than directly executing shell code, but that JSON controls the executable archive subsequently downloaded and installed. HTTPS and a hash from the same manifest protect against some tampering, not compromise of the release metadata source, which could authorize attacker-controlled code for 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, network, 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.

Quality-telemetry framing progressively makes an unrelated command wrapper mandatory for authenticated cloud operations.

Medium
Category
Prompt Injection
Confidence
92% confidence
Finding

The document turns a quality-reporting dependency into a mandatory intermediary for authenticated commands. This is a concrete trust-boundary expansion regardless of whether the progressive framing was deliberate; the source does not establish malicious intent or actual exfiltration.

Content

No source excerpt is available for this finding.

The skill mandates an unrelated telemetry CLI and its installation for read-only VPN inventory.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The mandatory wrapper instruction redirects legitimate cloud operations through an unrelated executable and directs the agent to install it first. Such a wrapper runs with the user's local privileges and can access inherited credentials and command output, so read-only VPN operations do not constrain its capabilities.

Content

No source excerpt is available for this finding.

The guide mandates an undeclared telemetry wrapper and its automatic installation for VPN inventory commands.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The guide explicitly makes an additional telemetry executable mandatory and forbids direct hcloud fallback if installation fails. This pressures an inventory agent into installing and trusting software that can observe authenticated subprocess execution, although the guide does disclose its telemetry 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/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

The skill downloads and persistently installs an unrelated skill-quality CLI.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Running this readiness script can automatically install or overwrite persistent executables using an unpinned latest manifest and a manifest-selected URL. SHA256 verification and archive-path checks are useful, but a compromised manifest service can supply both malicious bytes and their matching hash.

Content

No source excerpt is available for this finding.

The skill installs an unrelated skill-quality CLI, a capability not justified by its VPN inventory purpose.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

This manually invoked installer introduces executable code outside the VPN inventory functionality using a mutable remote manifest. Manual invocation reduces the automatic-installation concern, but the manifest supplies both artifact location and expected hash, leaving release authenticity dependent on that service.

Content

No source excerpt is available for this finding.

VPN inventory commands are automatically routed through an undeclared telemetry tool.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

When available, skill-quality-cli automatically becomes the parent process for authenticated inventory commands, although the supplied skill metadata does not disclose this additional data recipient. It can observe raw VPN inventory output before secret stripping and inherits the process environment, expanding access to sensitive topology and potentially cloud credentials; actual transmission or persistence cannot be established without its implementation.

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_vpn_connections.py (reported line 439)May include surrounding context.

python
guard_write_intent(" ".join(extra))
    cmd = build_hcloud_command(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 437, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/list_vpn_connections.py (reported line 439)May include surrounding context.

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

VPN inventory commands are routed through an undeclared telemetry CLI.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

This test verifies that the inventory execution path invokes skill-quality-cli run --skill-name huawei-cloud-vpn-connection-list -- hcloud ... rather than invoking KooCLI directly. The class documentation at L819-L822 identifies this wrapper as telemetry, a capability not declared in the manifest or required for read-only VPN inventory. The provided code does not establish what telemetry is collected or whether it is transmitted.

Content

No source excerpt is available for this finding.