Back to skill

Security audit

huawei-cloud-dws-dymem-diag

Security checks for vulnerabilities and agentic risk

Overview

This skill performs read-only cloud memory diagnosis, with precautions needed for credentials, installation, and sensitive reports.

Use a dedicated read-only identity for the intended project and configure secrets interactively rather than pasting them into chat or commands. Keep generated reports private, exclude them from version control, and delete them when no longer needed. Reports use Chinese and UTC+8. Follow [Huawei’s installation guide](https://support.huaweicloud.com/intl/en-us/qs-hcli/hcli_02_003.html) and verify downloads; external CLI and MCP implementations were not audited. The documented [MCP repository](https://github.com/huaweicloud/dws_ai_native/tree/dws_autopilot_mcp_server/hwcloud_dws_mcp_mag) exists, but the clone example uses a web-page URL and needs correction.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

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 · SKILL.md (reported line 117)May include surrounding context.

md
- Valid Huawei Cloud credentials (AK/SK mode or IAM Token)
- **Security Rules**:
  - Never expose AK/SK values in conversations or commands
  - Never ask users to input AK/SK directly in conversation
  - Only use `hcloud configure list` to check credential status

### 4. IAM Permission Requirements

Report timestamps are forced to Beijing time without user choice or a documented regional justification.

Medium
Category
Output Handling
Confidence
96% confidence
Finding

The skill mandates converting all report timestamps to Beijing time (UTC+8), repeated at L401 and L421. This imposes a specific locale convention without user opt-in or an explanation that the diagnostic tool is limited to a region requiring that convention.

Content

No source excerpt is available for this finding.

Sensitive diagnostic data is saved to a local HTML report without a privacy warning.

Medium
Category
Output Handling
Confidence
90% confidence
Finding

The workflow automatically persists SQL text, database usernames, internal IP addresses, and cluster identifiers in the workspace without specifying redaction, restrictive permissions, or retention controls. Although local reporting is legitimate for diagnosis, shared, synchronized, or version-controlled workspaces could expose sensitive query literals and infrastructure details to unintended readers.

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 · SKILL.md (reported line 420)May include surrounding context.

md
## Notes

- **Security**: Never expose AK/SK values in conversations or commands; never ask users to input AK/SK directly in conversation
- **Time Protocol**: from_ts/to_ts must use millisecond timestamps; report displays Beijing time; when converting Beijing time to timestamp, must append +08:00 timezone suffix; do not mentally calculate timestamp values; do not convert existing millisecond timestamps to time strings and then back
- **Output Constraints**: Strictly output the diagnosis report following the Output Format section template; do not modify template structure, do not omit any part, do not add remediation suggestions, do not output SQL optimization statements, do not use emoji, do not use custom format tags
- **Data Authenticity**: All diagnosis conclusions must come from actual tool return results; when tool returns empty or call fails, mark as "unavailable"; fabricating values is prohibited

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/hcloudcli/latest/hcloudcli-macos-amd64.tar.gz tar -xzf hcloudcli-macos-amd64.tar.gz chmod +x hcloud sudo mv hcloud /usr/local/bin/

text

### Linux (x86_64)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/hcloudcli/latest/hcloudcli-linux-amd64.tar.gz tar -xzf hcloudcli-linux-amd64.tar.gz chmod +x hcloud sudo mv hcloud /usr/local/bin/

text

### Linux (ARM64)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

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

curl -O https://obs-community-tool.obs.cn-north-1.myhuaweicloud.com/hcloudcli/latest/hcloudcli-linux-arm64.tar.gz tar -xzf hcloudcli-linux-arm64.tar.gz chmod +x hcloud sudo mv hcloud /usr/local/bin/

text

### Windows

Environment-variable setup omits a warning that entering secrets in export commands can expose them through shell history.

Medium
Category
Output Handling
Confidence
95% confidence
Finding

Users following the export examples with real AK/SK values may store those credentials in persistent shell history, and exported values are inherited by child processes. The guide recommends environment variables as a safe alternative without explaining these exposure paths; stolen credentials could permit cloud access within their IAM scope.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
85% 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/dws-mcp-installation-guide.md (reported line 102)May include surrounding context.

Other Commands

bash
# Manually trigger encryption (auto-executed on MCP Server startup as well)
python -m dws_autopilot_mcp.config_cli encrypt

# Show config status (secrets are masked as ******)

The mandatory template fixes report text in Chinese without offering a language choice.

Medium
Category
Output Handling
Confidence
97% confidence
Finding

L003 requires the template to be reproduced without modification, and L009 fixes its language to zh-CN. Together with the mandatory Chinese headings and labels (for example, L047–L065), this forces Chinese output without user opt-in or a documented language-specific justification.

Content

No source excerpt is available for this finding.

All report timestamps are forced to Beijing time without user opt-in or justification.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The instruction explicitly requires all times to use Beijing time, reinforced by the conversion rules at L128. The file provides neither a timezone choice nor a documented regional requirement justifying this fixed locale.

Content

No source excerpt is available for this finding.