Back to skill

Security audit

huawei-cloud-dcs-failover

Security checks for vulnerabilities and agentic risk

Overview

This tool performs real database failovers, but its safety checks and success reports can give misleading reassurance.

Use a test instance and narrowly scoped credentials. Before production use, require enforced target confirmation and cross-zone checks, and independently verify backups, data integrity, and application health. Do not treat generated scores as proof of safety. Prefer a verified CLI download over executing the remote installer directly.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/execute.py
Finding

Real failover lacks an executable confirmation gate

Content
View full analysis

Impact

An invocation without the required confirmation can switch the configured instance's roles and interrupt client connections. This is an unsafe execution path, not evidence of a deliberately malicious failover.

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (15)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The supplied execution implementation does not substantiate the advertised data consistency validation: it records post-failover measurements and treats some unavailable evidence as successful checks. Execution also makes some architecture checks configuration-dependent and does not explicitly enforce cross-AZ placement, creating unsafe assurance around a real database mutation; however, the default business score is disclosed in this document rather than concealed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The advertised mandatory cross-AZ gate conflicts with the supplied risk model's warning-only treatment of same-AZ deployments and the absence of an explicit cross-AZ execution gate. This can incorrectly suggest that a drill validates AZ resilience; the more specific allegations about preparation readiness calculations cannot be verified because prepare.py was not supplied.

Content

No source excerpt is available for this finding.

External Script Fetching

High
Category
Supply Chain
Confidence
98% confidence
Finding

The curl-to-bash command immediately executes a mutable remote script without independently authenticating its contents. HTTPS protects transport but does not prevent a compromised publisher or storage endpoint from supplying code that steals local cloud credentials or modifies the host.

Content

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

bash
# Linux / macOS
curl -sSL https://cn-north-4-hwc-cloudsite.obs.cn-north-4.myhuaweicloud.com/hcli/install.sh | bash

# Windows (PowerShell admin)
Invoke-WebRequest -Uri https://cn-north-4-hwc-cloudsite.obs.cn-north-4.myhuaweicloud.com/hcli/install.ps1 -OutFile install.ps1

Chaining Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

Piping the network response directly into bash turns fetched content into executable instructions without a verification boundary. This is the same supply-chain exposure identified by the external-script finding, not evidence of a separate malicious chaining campaign.

Content

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

bash
# Linux / macOS
curl -sSL https://cn-north-4-hwc-cloudsite.obs.cn-north-4.myhuaweicloud.com/hcli/install.sh | bash

# Windows (PowerShell admin)
Invoke-WebRequest -Uri https://cn-north-4-hwc-cloudsite.obs.cn-north-4.myhuaweicloud.com/hcli/install.ps1 -OutFile install.ps1

Anti-Refusal Statement

High
Category
Anti-Refusal
Confidence
80% confidence
Finding

Skill instructs the agent to omit warnings, disclaimers, or ethical commentary. Stripping safety caveats hides risk from the user and is a common jailbreak preamble.

Content

Scanner excerpt · references/risk-model.md (reported line 13)May include surrounding context.

md
| Level | Meaning | Impact on flow |
|-------|---------|----------------|
| 🟢 info | Normal, no risk signal | No warning, no block |
| ⚪ unknown | Data missing (no permission / timeout / no CES data / API unsupported) | Overall level raised to "medium", prompts manual confirmation; **not auto-passed** |
| 🟠 warning | Risk signal present, recommend handling or confirmation | Overall level raised to "medium", console/report warning; no auto-block |
| 🔴 critical | Very likely to affect failover success or data safety | Overall level raised to "blocked", execute rejects by default (requires `--force`) |

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: file_read, file_write, 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 one-click installation instructions execute downloaded scripts without warning about remote code execution or system changes.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

The recommended installation path executes remotely downloaded code without an integrity-verification step or explanation of its system changes. A compromised distribution endpoint could execute arbitrary code, with administrator privileges in the Windows example, on a machine used for cloud administration.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/risk-model.md (reported line 4)May include surrounding context.

md
# Risk Model (Threshold Business Semantics)

This document describes the threshold business rationale for **risk detection / assessment / warning** in `scripts/risk.py`.
The prepare phase automatically runs detection and assessment.

> 📌 **Single source of truth for thresholds**: all threshold values are authoritatively defined in the `THRESH` constant in `scripts/risk.py`.
> This document only describes the **business semantics and rationale** for each threshold; it does not duplicate threshold values.

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/config.py (reported line 113)May include surrounding context.

python
if extra_args:
        cmd.extend(extra_args)
    try:
        result = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
    except subprocess.TimeoutExpired:
        return {"_error": True, "stderr": f"hcloud 命令超时({timeout}s),请检查网络或减少查询范围"}
    except FileNotFoundError:

The documented before/after data comparison is not performed, and unavailable data can pass consistency validation.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The function does not capture or compare pre-failover data and instead labels topology changes and post-failover measurements as data consistency checks. Topology-query failures, missing key counts, and a missing topology master can be marked successful, allowing a clean verdict and inflated data score without evidence that data survived the drill.

Content

No source excerpt is available for this finding.

Business scoring always awards full marks despite documentation promising deductions for abnormal connection or latency metrics.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

Business health always receives 100 points and contributes 30% of the total without any availability, connection, or latency measurement. Although the skill documentation discloses this placeholder, the resulting numeric score can still overstate operational safety when applications are impaired.

Content

No source excerpt is available for this finding.

The IAM checker reports current-account authorization from policy definitions without establishing policy assignment.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The checker treats listed policy definitions as evidence of the current principal's permissions without establishing assignment or evaluating applicable resource scopes and conditions. It can therefore report failover authorization incorrectly, undermining preparation for a production-affecting drill; however, this result is advisory and does not bypass Huawei Cloud's server-side authorization.

Content

No source excerpt is available for this finding.

The advertised cross-AZ hard gate is treated as an advisory check.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The cross-AZ check explicitly sets critical=False, so a same-AZ deployment can fail this check while the preparation reports still declare it ready for failover. This contradicts both the advertised hard gate and the generated require_cross_az=True setting, potentially encouraging a disruptive production drill that cannot validate AZ resilience; whether execution independently blocks it cannot be determined from this file.

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/run.py (reported line 57)May include surrounding context.

python
elif phase == "report":
        cmd.extend(["--config-dir", config_dir])

    result = subprocess.run(cmd, cwd=SCRIPT_DIR)
    return result.returncode == 0

Required confirmation labels impose Chinese without user language opt-in.

Low
Category
Output Handling
Confidence
88% confidence
Finding

The interaction rule prescribes the Chinese confirmation options “强制演练 / 取消演练”; line 171 repeats that these are the only user-facing options. Unlike illustrative dialogue, this mandates specific-language output without offering a language choice or documenting a locale requirement.

Content

No source excerpt is available for this finding.