Back to skill

Security audit

huawei-cloud-waf-list

Security checks for vulnerabilities and agentic risk

Overview

This WAF inventory skill needs review because it requires automatically installed telemetry software whose data collection and credential access are insufficiently explained.

Before installing, request an optional telemetry workflow, a reviewed and pinned wrapper release, and clear documentation of reported data and credential handling. The external wrapper was not bundled, so its behavior remains unverified; disabling reporting alone does not resolve that uncertainty. Use a read-only cloud profile and verify protection-status results independently because the default query ignores that filter.

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

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The read-only inventory workflow introduces automatic installation of a remote executable and requires using it as a command wrapper. Although the dependency is disclosed later in the document, this expands the trust boundary beyond WAF queries and gives downloaded software access to the invoking user's environment and potentially WAF output.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supporting installer persistently copies remote executable content into the user's command directory, which exceeds the advertised inventory-only activity. Mandatory subsequent invocation makes compromise of that dependency consequential even though the actual WAF operations are GET requests.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Although located in an installation guide, this command performs a software update rather than a read-only WAF query. Automatically modifying the CLI installation is a distinct, undeclared capability, not merely an implementation detail of listing protected domains. The command does not itself modify WAF resources.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Installing and upgrading a separate skill-quality CLI is not a supporting implementation detail established by the declared WAF-listing purpose. The excerpt therefore introduces an unrelated capability. The installer scripts themselves were not supplied, so their implementation and side effects cannot be verified; this assessment is limited to the documented commands.

Content

No source excerpt is available for this finding.

The skill automatically downloads and installs an unrelated skill-quality-cli executable.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked, this helper automatically installs executable content selected by a mutable remote manifest, without a pinned version or independently authenticated package identity. SHA256 checking and traversal/link rejection are useful protections, but a compromised manifest can supply both a malicious package URL and its matching hash; subsequent wrapper execution would run it with user privileges.

Content

No source excerpt is available for this finding.

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 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.

Telemetry is presented as a dependency, then made a mandatory intermediary for all WAF commands.

Medium
Category
Prompt Injection
Confidence
93% confidence
Finding

Presenting telemetry as a dependency and forbidding direct hcloud invocation pressures the agent to introduce an unnecessary intermediary into credentialed operations. Disabling reporting does not remove the mandatory executable or its access to the process environment.

Content

No source excerpt is available for this finding.

Mandatory telemetry tooling adds an unrelated capability to a read-only WAF inventory skill.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

The mandatory wrapper places an additional executable in the execution path of an authenticated cloud inventory operation. It can inherit credential environment variables and mediate command output; its implementation and reporting payload are not supplied, so actual exfiltration is not established.

Content

No source excerpt is available for this finding.

The guide introduces installation and quality telemetry tooling unrelated to read-only WAF inventory.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The guide directs an inventory user or agent to an installer that automatically retrieves an unrelated telemetry executable when absent. This introduces a software-supply-chain dependency into a credentialed workflow; the reporting opt-out does not state that it prevents installation.

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 persistently installs skill-quality-cli.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The manual installer places executable content from an unpinned latest manifest into a persistent user command location, where the documented workflow later invokes it. Manual triggering reduces surprise, but the hash comes from the same manifest as the package URL and therefore does not protect against compromise of that release authority.

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

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

The default/cloud-mode query silently ignores the advertised --protect-status filter.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The default/cloud-mode path receives protect_status in extra but neither sends it to the API nor filters the returned hosts locally. In this security-inventory skill, callers or downstream automation relying on --protect-status can therefore receive hosts with unintended protection states and produce misleading security assessments, although the script does not modify WAF configuration.

Content

No source excerpt is available for this finding.

Acceptance checks require Chinese diagnostic messages without a user language choice.

Low
Category
Output Handling
Confidence
90% confidence
Finding

The verification criteria prescribe Chinese messages for empty results, missing permissions, and a missing CLI. No language opt-in or documented locale justification is provided; the example cloud region does not establish a required user-interface language.

Content

No source excerpt is available for this finding.

Error hints are fixed to Chinese without user language choice or a documented justification.

Low
Category
Output Handling
Confidence
95% confidence
Finding

The output description explicitly specifies Chinese error hints, imposing a language on that portion of the output. The file provides neither user opt-in nor a justification for this language constraint.

Content

No source excerpt is available for this finding.