Back to skill

Security audit

huawei-cloud-cci-list

Security checks for vulnerabilities and agentic risk

Overview

This cloud inventory skill requires extra telemetry software without explaining what information it reports.

Review before installing: request optional telemetry, documented reporting fields and destinations, and a separately approved, pinned dependency. Disabling reporting does not remove the wrapper's execution access. Use narrowly scoped read-only cloud credentials. All 11 bundled files were inspected; the scanner's three missing references are JSON field names, and its installer gap was reviewed directly. The downloaded wrapper remains unavailable for inspection, so data collection and exfiltration cannot be confirmed or ruled out.

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

Installing or overwriting executables under ~/.local/bin is an additional host-changing operation unrelated to listing CCI resources. The manual installer requires invocation, which reduces automatic exposure, but the documentation still channels inventory users toward trusting remotely selected executable code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill introduces automatic installation of an unrelated executable into a workflow advertised as read-only CCI inventory. Although the dependency is disclosed later in the document, installing a mutable remote release expands the trust boundary to software that can run with the user's filesystem and cloud-credential access.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

IAM schema discovery could support permission documentation, and this command does not visibly mutate resources. However, the declaration explicitly states that any operation other than the five CCI List operations is rejected before execution. The supplied command invokes a different service and operation, contradicting that restriction. The chunk does not establish whether the other advertised features are implemented.

Content

No source excerpt is available for this finding.

Automatically downloads and installs an unrelated skill-quality CLI outside the CCI inventory purpose.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked without a usable existing installation, this script downloads a latest-release manifest and installs its selected executable into the user's environment. SHA256 verification and archive checks mitigate corruption and traversal, but a compromised release service can supply both malicious bytes and their matching digest, enabling code execution when the installed tool is used.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
94% confidence
Finding

The highlighted request fetches JSON rather than executing a script directly, but that manifest controls the executable package URL and expected hash used later. Because both are supplied by the same mutable release service without independent package authentication, compromise of that service can result in installation of attacker-controlled code.

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.

CCI inventory commands require an unrelated quality-telemetry execution wrapper.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The instructions require an unrelated telemetry executable to mediate authenticated cloud commands, adding a party that could observe arguments, inherited environment, and command output. The wrapper implementation and reporting payload are absent, so actual secret collection or exfiltration cannot be confirmed; nevertheless, making it mandatory unnecessarily expands trust.

Content

No source excerpt is available for this finding.

The guide mandates an unrelated telemetry wrapper for CCI inventory commands.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

This guide mandates a telemetry wrapper for cloud inventory commands and directs users toward installing it when absent. That exposes authenticated command execution to an additional executable without establishing what it collects; disabling reporting does not remove the wrapper's execution privileges.

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 includes an unrelated remote software installer that persists skill-quality-cli executables in the user's environment.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

This installer writes remotely selected executable code into a shared user executable directory, outside the CCI inventory task. Manual invocation limits exposure, but an approved installation can still introduce compromised release code with access to the user's cloud environment when subsequently executed.

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_cci.py (reported line 329)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 323, 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_cci.py (reported line 329)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 diagnostics without a documented language choice or locale justification.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The criteria prescribe specific Chinese messages for empty results and permission errors. No user opt-in, locale selection, or justification for requiring Chinese output is documented in this file.

Content

No source excerpt is available for this finding.