Back to skill

Security audit

huawei-cloud-aad-protected-ip-list

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report an unrelated quality tool being required and installed for a read-only cloud inventory task, with incomplete scan coverage.

Consider avoiding installation until the quality tool is removed or made optional and its download is independently authenticated. The scan covered 9 of 10 components; one file was only partially inspected, so the evidence is incomplete. The verdict is suspicious, not a finding that the author acted maliciously.

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

The inventory workflow introduces an automatically installed executable and mandates routing cloud queries through it, expanding trust beyond the AAD client. Although the dependency is disclosed in the document body, its installation and execution introduce supply-chain exposure in a process that can access cloud credentials and sensitive inventory.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The mandatory quality-tool dependency adds persistent local executable installation and distribution-service access to a read-only inventory task. Its disclosure in prerequisites reduces concealment concerns but does not eliminate the unnecessary executable trust boundary or the consequences of a compromised release.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The commands manage skill-quality-cli rather than query Huawei Cloud AAD resources. Dependency setup can be a supporting implementation detail, but the supplied content establishes no connection between this tool and the declared inventory functionality. The helper script implementations are not shown, so their exact effects cannot be verified; nevertheless, the explicit upgrade command and documented installation purpose indicate an unrelated capability.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
88% confidence
Finding

The skill name matches the declared purpose, but a matching name does not constrain the command's behavior. The supplied template delegates a generic hcloud invocation without showing an AAD ListProtectedIp restriction or mutation rejection. This materially differs from the declared strictly read-only inventory interface. No actual mutation or unrelated resource access is demonstrated, and the behavior of the external wrapper cannot be established from this chunk alone.

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, not a script for immediate execution, but that JSON controls the executable package subsequently downloaded and installed. Because the mutable manifest supplies both the package URL and expected hash without independent release authentication, compromise of the distribution manifest can lead to attacker-controlled code being installed 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, 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 workflow mandates unrelated telemetry tooling for read-only protected-IP queries.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The mandatory wrapper instruction redirects a legitimate inventory query through unrelated quality-reporting software. That software may observe inherited credentials, command arguments, and protected-IP output; the provided sources do not establish what it actually reports, so exfiltration is a risk rather than a demonstrated behavior.

Content

No source excerpt is available for this finding.

Acceptance criteria mandate Chinese output labels and empty-result messages without a language choice or documented justification.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The checklist requires Chinese field labels in default and detailed output and specifies Chinese messages for empty results. These requirements impose an output language without user opt-in or a documented reason for the language constraint.

Content

No source excerpt is available for this finding.

The guide introduces unrelated quality-telemetry tooling outside the AAD inventory skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

This section provides executable commands to install and upgrade skill-quality-cli and documents a telemetry report with a disable switch. Quality reporting is not declared in the manifest and is not needed to query protected IPs through KooCLI or the SDK; the guide introduces an unjustified additional capability, although this file alone does not establish what data is reported.

Content

No source excerpt is available for this finding.

The script automatically downloads and installs an unrelated skill-quality CLI outside the protected-IP inventory skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

When invoked, this script automatically installs unrelated executable code using a mutable latest manifest and its selected download URL. SHA256 verification and traversal checks are useful defenses, but a compromised manifest can supply both a malicious package and its matching digest, which will be trusted when the installed tool is subsequently run.

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

The skill includes an unrelated skill-quality-cli downloader and persistent executable installer.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The manifest describes querying AAD protected-IP inventory using KooCLI or the Huawei Cloud AAD SDK, not installing skill-quality tooling. When manually invoked, this script retrieves a separate tool's release metadata and archive, then installs executable files under ~/.local/bin; that capability is unrelated to the declared inventory-query purpose, even though checksum validation is performed.

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

python
Raises RuntimeError on a non-zero exit or unparseable output.
    """
    proc = subprocess.run(
        args,
        capture_output=True,
        text=True,