Back to skill

Security audit

huawei-cloud-dds-list

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because scanners report risky package installation and command execution controls that are broader than its stated read-only DDS listing purpose.

Consider the scanners' recommendation not to install until the package-installation and command-override concerns are addressed. Coverage is incomplete: Skillspector inspected 11 of 12 components, reported partial analysis, and one static analyzer was degraded, so the results do not establish that unreported behavior is safe.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (1)

T08 · Insecure Dependencies

Error
Location
scripts/ensure_env.py
Finding

Dependency installation disables TLS certificate verification

Content
View full analysis

Impact

A network attacker can execute arbitrary code as the installing user, including accessing cloud credentials available to that process.

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 (19)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Installing an unrelated executable into a persistent user executable directory expands the inventory skill's effects beyond cloud reads. The dependency is documented, but its mandatory use still exposes the user's environment and cloud credentials to additional downloaded code.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The instructions make remotely distributed telemetry tooling part of a read-only inventory workflow, expanding trust to additional executable code running in a credential-bearing environment. Although the dependency is disclosed in the document body, mandatory installation and command wrapping introduce supply-chain exposure that DDS GET restrictions do not mitigate.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

In main(), an empty instance list prints the empty-region message and returns 0; --json prints [] and also returns 0. This directly contradicts the description's requirement that empty-list scenarios exit nonzero. Additionally, guard_operation() only checks the hard-coded string 'ListInstances', while run_hcloud() accepts DDS_LIST_HCLOUD_BIN and prepends DDS_LIST_HCLOUD_ARGS without validating either. These hooks do not establish an actual mutating request in the normal execution path, but the claimed universal pre-execution operation restriction is not enforced for the effective subprocess command. Otherwise, the supplied code closely matches the declared read-only inventory purpose; no unrelated data collection or explicit mutating DDS API call is present.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The tests otherwise align with the declared read-only DDS inventory purpose, including output modes, filters, pagination, authentication errors, fallbacks, and mutation guards. No unrelated resource access or undeclared mutating capability is visible. The concrete discrepancy is the success exit code expected for empty results. Because only the test file is supplied, this assessment identifies contradictory tested behavior, not independently verified runtime implementation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared workflow concerns DDS inventory through hcloud, huaweicloudsdkdds, or REST. This chunk instead documents installation and verification of skill-quality-cli, with no demonstrated connection to that workflow. Installing a necessary dependency could be a supporting implementation detail, but the supplied material establishes no such role for this tool. The scripts' actual installation actions and claimed checksum verification cannot be verified from this chunk.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
94% confidence
Finding

The fetched object is JSON rather than a directly executed script, but it controls the executable archive subsequently downloaded and installed. SHA256 verification detects corruption, yet a compromised manifest can supply both a malicious artifact URL and its matching hash, and the installer does not restrict download URLs to approved HTTPS origins.

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

Unrestricted executable and argument overrides expose arbitrary execution in a strictly read-only listing skill.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The documented test hooks remain active in normal execution and permit arbitrary executable replacement plus argument injection before the fixed DDS operation. An environment-controlling attacker could execute code or access inherited cloud credentials despite the strictly read-only interface, although the supplied content does not establish an independently reachable remote attack path.

Content

No source excerpt is available for this finding.

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.

Mandatory quality-telemetry tooling introduces a capability unrelated to listing DDS instances.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

Mandatory telemetry wrapping places an additional executable in the execution path of cloud commands without being necessary for inventory retrieval. That executable can observe command arguments and potentially results and inherited credentials; the provided material does not establish what it actually transmits.

Content

No source excerpt is available for this finding.

Error messages are required to be in Chinese without user language opt-in or a documented locale justification.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The acceptance criteria explicitly require Chinese hints for invalid credentials, insufficient permissions, and KooCLI failures. These requirements impose a specific output language without offering a user language choice or explaining why Chinese is necessary for this tool.

Content

No source excerpt is available for this finding.

The guide mandates an undeclared quality-telemetry dependency for DDS listing.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The guide explicitly declares the telemetry dependency, so it is not hidden, but it unnecessarily requires an additional executable to mediate every cloud command. Disabling reporting does not remove that executable from the credential-bearing command path.

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 DDS inventory skill automatically downloads and installs an unrelated skill-quality CLI.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The helper installs persistent executable code selected by a mutable remote manifest, including supporting reporting modules. Its checksum and archive checks are useful, but a checksum delivered by the same manifest does not protect against a compromised release service choosing both malicious bytes and their hash.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The subprocess invocation uses argument lists and is not a shell-injection issue, but its pip command explicitly marks third-party mirrors as trusted hosts, weakening TLS certificate verification. Installing unpinned packages without independently verified hashes through that path can allow an intercepted or compromised mirror to supply code that runs with the user's privileges.

Content

Scanner excerpt · scripts/ensure_env.py (reported line 58)May include surrounding context.

python
def run_cmd(cmd, timeout=300):
    try:
        proc = subprocess.run(
            cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
            timeout=timeout, universal_newlines=True,
        )

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

Installs an unrelated skill-quality CLI outside the DDS inventory skill's stated purpose.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The installer persists an additional executable and reporting modules unrelated to DDS retrieval, using artifacts selected by a mutable remote manifest. Manual invocation reduces surprise but does not remove the supply-chain exposure when this installer is prescribed as part of the skill workflow.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The subprocess call executes an executable and prepended arguments taken from unrestricted environment overrides, allowing anyone controlling those variables to run arbitrary code with the skill process's permissions and inherited credentials. Although list-form arguments prevent ordinary shell interpolation, the read-only operation guard does not validate the executable or injected arguments; this overlaps the other two findings.

Content

Scanner excerpt · scripts/list_dds.py (reported line 364)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 358, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
96% confidence
Finding

DDS_LIST_HCLOUD_BIN and DDS_LIST_HCLOUD_ARGS flow into subprocess execution without validation, so an attacker able to influence the launch environment can replace hcloud with another program and supply its arguments. These values bypass the command-line write-intent checks, undermining the skill's read-only boundary; exploitation requires environment control rather than merely a malicious instance-name filter.

Content

Scanner excerpt · scripts/list_dds.py (reported line 364)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,
        )

Empty instance lists are tested as successful exits, contrary to the manifest's non-zero-exit guarantee.

Low
Category
Excessive Agency
Confidence
98% confidence
Finding

The manifest explicitly includes empty instance lists among conditions that produce a non-zero exit. However, L498–L507 assert that main returns 0 for empty responses both with and without filters, encoding a contradictory success contract that could mislead automation relying on the documented exit status.

Content

No source excerpt is available for this finding.