Back to skill

Security audit

Wps Cloud Skill

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because WPS document work is accompanied by instructions to publish the skill directory to a fixed GitHub repository, creating a risk of unintended file disclosure or repository changes.

Consider avoiding installation unless you need this skill and can review its publishing instructions first. In particular, do not follow the GitHub publish steps without checking the exact files and repository, and understand where authentication data and the persistent client identifier may be stored. The scan is partial because some referenced paths could not be resolved, so it does not establish that all behavior is safe.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (15)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The instruction to publish the skill directory to lumz/wps-connector introduces an external write destination unrelated to the user's WPS documents. If followed with available GitHub authorization, this could disclose packaged local files or modify a repository without explicit user intent.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The skill introduces repository initialization, bulk staging, and pushing to a hard-coded GitHub repository despite being intended for WPS document operations. An agent following this workflow could upload local skill files, including unignored credentials, using the user's Git credentials without task-specific authorization.

Content

No source excerpt is available for this finding.

The publishing workflow stages the entire skill directory without warning that locally stored credentials may be published.

High
Category
Output Handling
Confidence
96% confidence
Finding

The publishing sequence uses git add -A, which stages all unignored files, without supplying secret exclusions or a staged-file review. The instruction to clean SKILL.md does not protect credential files elsewhere in the directory, so any such files could enter Git history and be pushed.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

python
2. 打开 https://mcp-center.wps.cn/kdocs-auth/auth-guide?auth_code=%2A%2A%2A<code>
  3. 用户用 **WPS 个人账号** 登录(企业账号会被拒,返回 403)
  4. 轮询 POST https://api.wps.cn/office/v5/ai/skill_hub/wps_auth/exchange 拿 token
  5. token 写入 ~/.hermes/.env 的 WPS_KDOCS_TOKEN=(0600)

用法:
  python3 wps_auth.py            # 授权并写入 token(自动开浏览器)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/wps_mcp.py (reported line 5)May include surrounding context.

python
"""WPS/金山文档 连接器 — MCP 客户端(Hermes 版)

协议:streamable-http JSON-RPC 2.0,端点 https://mcp-center.wps.cn/skill_hub/mcp
认证:Authorization: Bearer <skill_hub token>(token 由 wps_auth.py 取得,存在 ~/.hermes/.env 的 WPS_KDOCS_TOKEN)

用法:
  python3 wps_mcp.py list                        # 列出全部工具名

Tainted flow: 'req' from open (line 82, file read) → urllib.request.urlopen (network output)

High
Category
Data Flow
Confidence
80% confidence
Finding

File contents flow to a network sink. This may indicate data exfiltration of sensitive files.

Content

Scanner excerpt · scripts/wps_mcp.py (reported line 84)May include surrounding context.

python
h["mcp-session-id"] = self.sid
        req = urllib.request.Request(self.url, data=json.dumps(payload).encode(), headers=h)
        try:
            with urllib.request.urlopen(req, timeout=self.timeout) as r:
                status = r.status
                resp_headers = dict(r.headers)
                body = r.read()

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network, 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 includes a GitHub self-publication workflow unrelated to operating WPS cloud documents.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

Embedding a self-publication workflow in agent-facing operational instructions creates a task-scope expansion from document management to external publication. The workflow lacks a clear requirement for separate user authorization and can expose files if an agent treats it as routine setup.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · references/protocol.md (reported line 11)May include surrounding context.

md
| --- | --- |
| MCP 服务 | `https://mcp-center.wps.cn/skill_hub/mcp` |
| 授权引导页 | `https://mcp-center.wps.cn/kdocs-auth/auth-guide?auth_code=%2A%2A%2A<uuid4>` |
| 换取 token | `POST https://api.wps.cn/office/v5/ai/skill_hub/wps_auth/exchange` body `{"code":"<uuid4>"}` |

## 2. 请求头

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wps_auth.py (reported line 8)May include surrounding context.

python
1. 生成 auth_code(uuid4)
  2. 打开 https://mcp-center.wps.cn/kdocs-auth/auth-guide?auth_code=%2A%2A%2A<code>
  3. 用户用 **WPS 个人账号** 登录(企业账号会被拒,返回 403)
  4. 轮询 POST https://api.wps.cn/office/v5/ai/skill_hub/wps_auth/exchange 拿 token
  5. token 写入 ~/.hermes/.env 的 WPS_KDOCS_TOKEN=(0600)

用法:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/wps_auth.py (reported line 31)May include surrounding context.

python
import uuid

AUTH_GUIDE = "https://mcp-center.wps.cn/kdocs-auth/auth-guide?auth_code=%2A%2A%2A}"
EXCHANGE = "https://api.wps.cn/office/v5/ai/skill_hub/wps_auth/exchange"
ENV_FILE = os.environ.get("WPS_KDOCS_ENV_FILE", "wps_kdocs.env")
TOKEN_KEY = "WPS_KDOCS_TOKEN"
TIMEOUT = 300

The documented credential destination contradicts the implementation: L009 promises ~/.hermes/.env, but L032 defaults to a relative wps_kdocs.env file.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The promised home-directory credential location differs from the working-directory-relative default, making storage dependent on where the script runs and potentially placing secrets in a project or shared directory. As written, os.makedirs('') fails for the bare default filename, so default execution currently aborts before saving; the unsafe location remains relevant when a relative path containing a directory is configured or that failure is repaired.

Content

No source excerpt is available for this finding.

Tainted flow: 'ENV_FILE' from os.environ.get (line 32, credential/environment) → open (file write)

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

python
out.append(line)
    if not replaced:
        out.append(f"{TOKEN_KEY}={token}")
    with open(ENV_FILE, "w", encoding="utf-8") as fh:
        fh.write("\n".join(out) + "\n")
    os.chmod(ENV_FILE, 0o600)

Tainted flow: 'CLIENT_ID_FILE' from os.environ.get (line 30, credential/environment) → open (file write)

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

python
return cid
    cid = uuid.uuid4().hex[:16]
    os.makedirs(os.path.dirname(CLIENT_ID_FILE), exist_ok=True)
    with open(CLIENT_ID_FILE, "w", encoding="utf-8") as fh:
        fh.write(cid)
    os.chmod(CLIENT_ID_FILE, 0o600)
    return cid

The client silently creates a persistent identifier file and sends the identifier to WPS.

Low
Category
Output Handling
Confidence
94% confidence
Finding

The client_id function creates directories and writes a persistent identifier to ~/.hermes/wps_kdocs_client_id without a comment, docstring, or user-facing notice explaining this side effect. Session initialization invokes it automatically and includes the identifier in the X-Client-Id header (line 71), but the module documentation discloses only the endpoint and token authentication, not this persistent identifier.

Content

No source excerpt is available for this finding.