Back to skill

Security audit

huawei-cloud-vpc-subnet-list

Security checks for vulnerabilities and agentic risk

Overview

Review is needed because this subnet inventory skill requires additional telemetry software without explaining what data it collects or where it sends it.

Before installing, request an optional telemetry workflow, a reviewed pinned package, and clear disclosure of collected data and its destination. SKILL_QUALITY_REPORT=0 is documented, but its behavior cannot be verified without the downloaded implementation and it does not remove the wrapper requirement. Use narrowly scoped subnet-list credentials. All bundled files were inspected; the remaining material uncertainty is the external telemetry software, not evidence of proven credential theft.

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
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Rogue AgentSelf-Modification, Session Persistence
Findings (15)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The referenced installer persistently writes executable files under the user's local binary directory rather than merely listing subnets. This duplicates the preceding scope-expansion concern: the cloud API being read-only does not make downloaded local code read-only or prevent it from accessing credentials.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The subnet-listing workflow introduces installation and execution of an additional telemetry tool, expanding trust beyond the cloud CLI and SDK. Although the document body mentions this dependency, mandatory installation is outside the metadata's inventory-only scope and introduces executable code into an environment containing cloud credentials.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The document directs installation and maintenance of an unrelated telemetry tool as part of a subnet inventory skill. The mismatch is real, but the finding overstates concealment and automation: the body discloses the tool and describes upgrades as manual, not automatic.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

The matched request fetches JSON rather than directly executing a script, but the subsequent flow installs an executable selected by that mutable manifest. Because the package URL and expected checksum come from the same live authority, compromise of that authority can substitute both; there is no independent signature or pinned release identity shown.

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.

Quality-assurance framing progressively makes an unrelated telemetry tool mandatory for authenticated cloud commands.

Medium
Category
Prompt Injection
Confidence
92% confidence
Finding

Quality-assurance language escalates an ancillary telemetry dependency into a mandatory intermediary for authenticated commands. This creates an unnecessary trust boundary crossing, although the wording alone does not prove malicious intent or that the Python script implements the wrapper.

Content

No source excerpt is available for this finding.

The workflow mandates an additional telemetry tool and automatic installation beyond the manifest's subnet-listing scope.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The mandatory wrapper instruction redirects an agent from a read-only cloud query into acquiring and running additional software. A wrapper around authenticated commands runs in the same security context and can potentially access command output and inherited credentials, regardless of the ListSubnets write guard.

Content

No source excerpt is available for this finding.

Mandatory command telemetry lacks a meaningful privacy disclosure about collected data and its destination.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The document requires command telemetry without specifying its payload, destination, retention, or redaction guarantees. Authenticated subnet queries expose infrastructure identifiers and network topology, so inadequate disclosure prevents informed authorization; the supplied material does not establish that such data is actually transmitted.

Content

No source excerpt is available for this finding.

The guide mandates an undeclared telemetry wrapper for subnet-listing commands.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The guide makes an additional telemetry executable a prerequisite and forbids proceeding with the cloud CLI when that tool cannot be installed. This pressures an agent into installing unrelated software with access to the authenticated process environment; the reporting-disable variable does not remove that execution dependency.

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

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

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The readiness check downloads a remotely selected telemetry package and persistently installs executable components without a separate approval step. HTTPS, checksum verification, and archive checks reduce some risks, but they do not justify this additional executable trust relationship for a subnet-listing task.

Content

No source excerpt is available for this finding.

The subnet-listing skill includes an unrelated remote software installer.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

This installer acquires and persistently installs telemetry software unrelated to the subnet-query implementation. Manual invocation reduces the risk compared with automatic installation, but the surrounding mandatory dependency workflow can still induce installation without task-specific authorization for this scope expansion.

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

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_subnet.py (reported line 236)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 230, 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_subnet.py (reported line 236)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,
        )