Back to skill

Security audit

huawei-cloud-waf-false-alarm-diagnosis

Security checks for vulnerabilities and agentic risk

Overview

The WAF diagnosis is carefully limited, but it requires an automatically installed reporting tool whose code and handling of sensitive information cannot be verified.

Review the reporting dependency before installing: require a fixed, verified release and documented data collection, or remove the mandatory wrapper. Its downloaded implementation was unavailable for inspection, so transmitted information and the reporting-disable switch remain unverified. Use target-project read-only credentials and verified packages from the [official KooCLI guide](https://support.huaweicloud.com/qs-hcli/hcli_02_003.html). Review whitelist and log-only commands carefully because they can reduce protection.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (18)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

A nominally read-only diagnosis workflow directs installation of an additional executable and makes it the execution wrapper for authenticated cloud commands. Although the dependency is disclosed in the body, automatically introducing remotely supplied code expands the trust boundary beyond WAF queries and can expose the agent's local privileges and cloud credentials if that dependency is compromised.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Requiring an automatically installed quality-reporting executable introduces code execution unrelated to determining which WAF rule blocked a request. A compromised wrapper would run in the same environment as authenticated hcloud commands, so the workflow's read-only WAF restriction would not protect local credentials or files.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill directs persistent local executable installation despite describing its operational boundary as read-only diagnosis. The dependency is mentioned in the documentation, so it is not entirely undeclared, but its installation and privileged position around cloud commands remain a meaningful supply-chain exposure.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

Process substitution passes a remotely fetched, mutable installer directly to Bash. Compromise of the installer distribution path would therefore become arbitrary code execution in the local environment used for cloud administration.

Content

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

Linux / macOS

bash
bash <(curl -s https://cli-hk.obs.myhuaweicloud.com/install.sh)   # or follow the official guide
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 · references/cli-installation-guide.md (reported line 35)May include surrounding context.

bash
# example pinned version + SHA256 verification (version may be upgraded over time)
wget -q -O /tmp/skill-quality-cli https://release.example/skill-quality-cli-v1.1.6
echo "<sha256-of-archive>  /tmp/skill-quality-cli" | sha256sum -c - && install -m 0755 /tmp/skill-quality-cli ~/.local/bin/skill-quality-cli
export PATH="$HOME/.local/bin:$PATH"
skill-quality-cli --version

External Script Fetching

High
Category
Supply Chain
Confidence
95% confidence
Finding

The pipe at this line parses JSON with fixed Python code; it does not directly execute the server response. Nevertheless, the remotely supplied version controls which executable archive the remainder of this script downloads and installs without independent authentication, making this the entry point of a vulnerable software-supply chain.

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: 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 execution-quality telemetry is unrelated to the manifest's WAF diagnosis purpose.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

Mandatory reporting places an additional executable between the agent and queries that can return sensitive request payloads, source IPs, and security configuration. The supplied material does not establish what is transmitted, so actual exfiltration is unproven, but requiring this integration without a defined data contract or prior consent creates an avoidable trust and privacy exposure.

Content

No source excerpt is available for this finding.

The installation command executes a remotely downloaded script without a warning about running external code.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The command immediately executes the network response as Bash without pinning or authenticating the installer contents. HTTPS and a vendor-associated hostname reduce transport risk but do not prevent a compromised distribution endpoint from supplying code that runs with the user's privileges.

Content

No source excerpt is available for this finding.

The guide introduces installation of an unrelated quality-reporting executable outside the WAF diagnosis scope.

Medium
Category
Excessive Agency
Confidence
94% confidence
Finding

L35–L38 instruct downloading, installing, and executing skill-quality-cli, which L29 identifies as a quality-reporting tool. Unlike hcloud, this auxiliary executable is not justified by the manifest's WAF diagnosis and remediation purpose; L41 explicitly confirms that business execution does not depend on it.

Content

No source excerpt is available for this finding.

The workflow recommends whitelisting without warning that it can bypass security protections.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The workflow directs the agent to recommend global or IP whitelisting and has the user execute the chosen command. Although it includes verification and a rollback guide, it does not warn that a whitelist may exempt matching malicious traffic from blocking, potentially beyond the reported false positive.

Content

No source excerpt is available for this finding.

The script automatically downloads and persistently installs unrelated skill-quality tooling.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The script selects a remotely advertised latest version, downloads its archive, and persistently installs executable and Python files without a checksum or signature check. A compromised release service or artifact repository can therefore supply code that will later execute with the cloud operator's local 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 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

Installs an unrelated skill-quality CLI persistently rather than supporting WAF false-positive diagnosis.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The script downloads a dynamically selected archive and installs its executables into a persistent user executable directory without verifying an independently trusted signature or digest. A compromised release source could therefore plant code that runs with the user's privileges when subsequently invoked; adding a quality CLI unrelated to WAF diagnosis unnecessarily expands the skill's trust boundary. The installer does not itself execute the downloaded CLI, and the provided file does not establish malicious intent.

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

The trigger list includes generic symptoms without requiring Huawei Cloud WAF context.

Low
Category
Trigger Abuse
Confidence
94% confidence
Finding

Triggers such as "页面打不开" (page won't open), "接口被拦" (interface blocked), and "false positive" also describe unrelated browser, networking, or security problems. Although the skill describes WAF diagnosis, its activation instructions do not require confirmed Huawei Cloud WAF involvement before matching these standalone phrases.

Content

No source excerpt is available for this finding.

The authentication verification command forces English CLI output without user choice or justification.

Low
Category
Output Handling
Confidence
88% confidence
Finding

The --cli-lang=en option explicitly selects English output regardless of the user's preferred locale. The guide provides neither an opt-in nor a documented reason for imposing that language.

Content

No source excerpt is available for this finding.