Back to skill

Security audit

huawei-cloud-eip-query

Security checks for vulnerabilities and agentic risk

Overview

The cloud queries are read-only, but the skill requires an extra reporting tool whose downloads, data handling, and lasting installation are insufficiently explained.

Review before installing. Ask the publisher to explain or remove the mandatory reporting wrapper, disclose uploaded data and destinations, and provide pinned, verifiable downloads. Use narrowly scoped read-only cloud credentials and review installers before execution. All ten bundled files were inspected; the remotely downloaded wrapper remains unreviewed, so its data handling and documented upload-disable option could not be verified. The artifacts do not establish malicious intent or exfiltration.

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (16)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The mandatory quality-tool wrapper expands a read-only monitoring workflow to include executing an additional utility whose installation is not disclosed in the description. Its bundled installers write downloaded executables into the user's local executable directory, introducing a supply-chain trust boundary beyond the advertised EIP functionality.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill mandates routing cloud operations through skill-quality-cli, although its declared purpose only describes hcloud queries. The bundled installers corroborate an additional persistent, remotely supplied dependency that can run with the user's privileges and potentially access inherited cloud credentials; automatic installer invocation is not established here.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The curl-to-bash command executes whatever script the latest URL returns, without independently verifying its contents. HTTPS protects transport but does not prevent a compromised publisher or distribution endpoint from delivering malicious code.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 14)May include surrounding context.

bash
# One-click install
curl -sSL https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh | bash

# Verify
hcloud version

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The pipe connects remote response bytes directly to a shell, crossing the data-to-code boundary without review or integrity verification. This is the same supply-chain execution risk as the external-fetch finding, rather than evidence of a separate malicious tool chain.

Content

Scanner excerpt · references/cli-installation-guide.md (reported line 14)May include surrounding context.

bash
# One-click install
curl -sSL https://hwcloudcli.obs.cn-north-1.myhuaweicloud.com/cli/latest/hcloud_install.sh | bash

# Verify
hcloud version

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"
OBS_BASE="https://obs-skills-repository.obs.cn-north-4.myhuaweicloud.com/skill-quality-cli"

V=$(curl -s "${API_URL}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])' 2>/dev/null)
if [ -z "$V" ]; then
    echo "警告: 无法获取 skill-quality-cli 最新版本,跳过安装" >&2
    exit 0

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

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

sh
API_URL="https://skillsapi.developer.myhuaweicloud.com/api/quality/cli/latest"
OBS_BASE="https://obs-skills-repository.obs.cn-north-4.myhuaweicloud.com/skill-quality-cli"

V=$(curl -s "${API_URL}" | python3 -c 'import sys,json;print(json.load(sys.stdin)["version"])' 2>/dev/null)
if [ -z "$V" ]; then
    echo "无法获取 skill-quality-cli 最新版本" >&2
    exit 1

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 one-click installation command executes a remotely downloaded script without warning about its access to the local system.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The installation example immediately executes a mutable remote script with the user's privileges without an integrity check or explanation of local-system access. Installation is relevant to the skill, but compromise of the distribution endpoint could expose local files and cloud 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/eip_query.py (reported line 81)May include surrounding context.

python
def run_hcloud(args, region=None):
    cmd = [HCLOUD] + args + [f"--cli-region={region or REGION}"]
    proc = subprocess.run(cmd, capture_output=True, text=True)
    if proc.returncode != 0:
        _raise_hcloud_error(
            args, proc.stderr.strip() or proc.stdout.strip() or f"exit code {proc.returncode}"

Tainted flow: 'cmd' from os.environ.get (line 80, 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/eip_query.py (reported line 81)May include surrounding context.

python
def run_hcloud(args, region=None):
    cmd = [HCLOUD] + args + [f"--cli-region={region or REGION}"]
    proc = subprocess.run(cmd, capture_output=True, text=True)
    if proc.returncode != 0:
        _raise_hcloud_error(
            args, proc.stderr.strip() or proc.stdout.strip() or f"exit code {proc.returncode}"

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/eip_query.py (reported line 209)May include surrounding context.

python
from_ms = parse_time(args.from_ms)
        to_ms = parse_time(args.to_ms)
        if from_ms is None:
            from_ms = int(__import__("time").time() * 1000) - 3600_000
        if to_ms is None:
            to_ms = int(__import__("time").time() * 1000)

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/eip_query.py (reported line 211)May include surrounding context.

python
if from_ms is None:
            from_ms = int(__import__("time").time() * 1000) - 3600_000
        if to_ms is None:
            to_ms = int(__import__("time").time() * 1000)

        metrics = args.metric or list(EIP_METRICS.keys())
        results = {}

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

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked, this helper downloads a remotely selected quality-tool archive and installs its executables and Python modules into ~/.local/bin without signature or checksum verification. This expands a read-only cloud-query skill into persistent installation of unrelated code, which could execute with access to the user's files and credentials if the distribution source is compromised.

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 35)May include surrounding context.

sh
tar xzf "${TMPDIR}/sqc.tar.gz" -C "${TMPDIR}"

mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${TMPDIR}/skill-quality-cli" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.bin" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.d/cli_entry.py" ~/.local/bin/skill-quality-cli.d/ 2>/dev/null

The script installs an unrelated skill-quality CLI rather than tooling needed for EIP queries or bandwidth monitoring.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

This installer fetches a dynamically selected quality-tool archive and writes its executable components into the user's local executable directory without independent integrity verification. Manual invocation reduces surprise but does not remove the supply-chain risk or justify an unrelated dependency in a read-only EIP-query workflow.

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 25)May include surrounding context.

sh
curl -fsSL -o "${TMPDIR}/sqc.tar.gz" "${OBS_BASE}/v${V}/skill-quality-cli-v${V}-linux-${ARCH}.tar.gz"
tar xzf "${TMPDIR}/sqc.tar.gz" -C "${TMPDIR}"

mkdir -p ~/.local/bin/skill-quality-cli.d
cp "${TMPDIR}/skill-quality-cli" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.bin" ~/.local/bin/ 2>/dev/null
cp "${TMPDIR}/skill-quality-cli.d/cli_entry.py" ~/.local/bin/skill-quality-cli.d/ 2>/dev/null