Back to skill

Security audit

huawei-cloud-clouddocs-aipage

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because its setup may install a CLI and change PATH without clear user approval; scanner coverage was partial, so some evidence is incomplete.

Consider the suspicious verdict before installing. The scanners report that setup may install an executable and change PATH without clear approval, and that local draft content may be sent to a cloud service when creating a page. The scan covered 90.9% of components; the bundled Windows executable exceeded the analysis limit, and several static checks were therefore partial. The evidence does not establish malicious intent, but it is incomplete.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (14)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code implements the online-document creation portion of the description, but stops after saving created_doc.json and page.kpge and returning the link. It contains no export step or DOCX output handling, so the promised local Word copy is not implemented in this chunk. Its Markdown input reads, metadata writes, and authentication checks are supporting implementation details, not unrelated capabilities. No additional undeclared behavior is evident in the supplied code; the imported helper's implementation was not provided.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/_hws_cli.py (reported line 9)May include surrounding context.

python
CLI 契约(对齐 clouddocs-cli help + clouddocs SKILL.md):
  - 输出统一 JSON 信封:{"ok":true,"identity":"user","data":{...}}(失败时 {"ok":false,"error":{...}})。
  - 认证由 CLI 自身管理(keyring + 自动刷新),脚本不读宿主注入的 token env。
  - organization_id / wiki_id 由本模块自动解析后显式传入 page +create,模型无需手动前置 space +fetch:
      organization_id 由 `space +fetch --only_personal true` 取(个人空间),
      wiki_id 由 `docbase +fetch --organization_id <id> --only_default_wiki true` 取(默认文档库);

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, 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 skill instructs automatic CLI installation without notifying the user about system changes.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

A document-creation request can automatically trigger installation of an executable and persistent changes to the user's PATH without an explicit approval step. Although the installation guide calls for brief progress messages, these do not provide informed consent for system changes, and the main skill's silence rule creates conflicting guidance.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · SKILL.md (reported line 126)May include surrounding context.

md
## 文件契约(drafts 中间产物,一律在项目工作目录下)

| 文件                                     | 说明                                                                                               |
| ---------------------------------------- | -------------------------------------------------------------------------------------------------- |
| `<项目工作目录>/drafts/page.md`          | 模型生成的 markdown(步骤 1 落盘,create_page.py 读取)                                            |
| `<项目工作目录>/drafts/created_doc.json` | 建文档锚点(doc_id / doc_url,幂等依据)                                                           |

The skill mandates Chinese text without offering a language choice.

Medium
Category
Output Handling
Confidence
99% confidence
Finding

The instruction '文本中文,JSON 键名英文' explicitly requires natural-language text to be Chinese. The file provides neither user opt-in nor a documented justification for overriding the user's preferred language.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
安装包**不随技能仓库/PR 分发**(clouddocs-cli 为内部工具,其二进制安装包由维护方独立发布)。如脚本同目录未找到安装包,按以下渠道获取:

| 渠道                                         | 说明                                                                                       |
| -------------------------------------------- | ------------------------------------------------------------------------------------------ |
| 内部软件分发仓(OBS / 内部制品仓)           | 向 clouddocs-cli 维护团队申请访问权限后检索下载                                           |
| 包名规范                                     | `clouddocs-cli-<版本>[-<环境>]-windows-amd64.zip`(环境后缀:`-m3sdv` 测试 / `-m3prod` 生产) |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| -------------------------------------------- | ------------------------------------------------------------------------------------------ |
| 内部软件分发仓(OBS / 内部制品仓)           | 向 clouddocs-cli 维护团队申请访问权限后检索下载                                           |
| 包名规范                                     | `clouddocs-cli-<版本>[-<环境>]-windows-amd64.zip`(环境后缀:`-m3sdv` 测试 / `-m3prod` 生产) |
| 版本示例                                     | `0.5.7`                                                                                    |
| 下载后放置位置                               | `<技能基目录>/bin/windows/`(与 `install-windows.ps1` 同目录)                             |

## 步骤 1. 检测是否已安装

The document-creation test sends local draft content to a cloud service without a privacy warning.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The acceptance step instructs running create_page.py with drafts/page.md to create an online document. Although online creation is identified, the instructions do not warn that the local draft's contents will leave the machine and be stored in the configured cloud service.

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

python
超时/找不到命令等子进程层异常以 (None, "", 错误串) 返回,调用方统一按"网络/进程失败"处理。
    """
    try:
        proc = subprocess.run(
            [_find_cli(), *args],
            capture_output=True, text=True, timeout=timeout,
            input=input_text,

Tainted flow: 'args' from os.environ.get (line 206, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/_hws_cli.py (reported line 50)May include surrounding context.

python
超时/找不到命令等子进程层异常以 (None, "", 错误串) 返回,调用方统一按"网络/进程失败"处理。
    """
    try:
        proc = subprocess.run(
            [_find_cli(), *args],
            capture_output=True, text=True, timeout=timeout,
            input=input_text,