Back to skill

Security audit

kingdoc

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it reports serious access-control, script-safety, and data-integrity weaknesses alongside many discrepancies between advertised and implemented features.

Consider avoiding installation until the reported permission, script-safety, and data-handling issues are addressed. If you are evaluating it, do not provide its App Secret in chat, and treat scan results as incomplete because some components were only partially inspected.

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
engine/template_marketplace.py
Finding

Template metadata controls the generated document's destination path

Content
View full analysis

Impact

For example, a name of ../outside causes creation of outside_.md in the output directory's parent. Absolute names can target other existing writable directories. This permits unauthorized Markdown file placement outside the intended output location.

Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (91)

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

md
用户上传默认拦截:`.bat .cmd .ps1 .vbs .exe .dll .lnk .msi`、
`.docx .xlsx .pptx .doc .xls .ppt .xlsm .docm .pptm`、
`.iso .dmg .zip .rar .7z .tar .gz .apk .jar`、
`.DS_Store .git .env .log .tmp`、`.sh .com .scr .hta .reg`。
技能内部生成的 docx/pptx/pdf/svg 等经豁免通道上传。

## 📚 文档

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 · engine/security.py (reported line 8)May include surrounding context.

python
2. Office 二进制文档(默认拦截用户上传):.docx .xlsx .pptx .doc .xls .ppt
                                     .xlsm .docm .pptm
  3. 二进制镜像 / 安装包:.iso .dmg .zip .rar .7z .tar .gz .apk .jar
  4. 系统缓存 / 隐藏文件:.DS_Store .git(.git 目录) .env .log .tmp
  5. 其他风险脚本:.sh .com .scr .hta .reg

设计原则:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The code is aligned with the declared document-editing domain, but materially falls short of the explicitly advertised smart-canvas editing capabilities. Supplying a backend causes mutation methods to return success without performing mutations; local mode supports appending but not element-ID updates or deletion. The mismatch concerns claimed behavior versus implemented behavior, not unrelated functionality or excessive permissions. Other suite-wide features cannot be assessed from this single module.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported implementation ignores space and viewer identity while allowing reads when permission matrices are absent or empty. In a shared enterprise index, this can expose document snippets and search results across users or spaces, directly contradicting the promised mandatory authorization boundary.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The clearest discrepancy is executable rather than inferred: _wrap returns a decorator accepting one function, but cloud tools call it as though it were the backend wrapper. Calls with multiple arguments raise TypeError; calls with one argument return a function that cannot be awaited; zero-argument calls omit the required decorator argument. Consequently, most advertised cloud-management tools never reach their backend methods. Separately, many online-facing tools explicitly select backend=None, so this file does not establish the claimed deep cloud integration for those paths. The cross-form add endpoint is a demonstrable no-op despite returning success. These are material capability overstatements, not evidence of an unrelated malicious purpose. Implementations hidden in imported modules, including OCR locality, signature verification, and performance guarantees, cannot be independently verified from this chunk.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The mismatch is the additional third-party update-checking and upgrade-messaging behavior, rather than the absence of document-management features in this individual module. Local caching and version comparison are supporting implementation details, but the SkillHub communication introduces an external resource and purpose not disclosed by the description's WPS-focused integrations. The request sends only the skill slug and supplied version; the code does not show document-content transmission, automatic installation, or execution of the returned instructions. Daily checking occurs only when the function is invoked, not through a scheduler implemented here.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| v4.2.0 | 2026-09-19 | 增加:团队知识库模式引擎 `engine/knowledge_hub.py`(空间级本地倒排索引全文检索,可选 jieba 中文分词,权限矩阵先鉴权后检索,无 read 权限文档不进结果集,硬件自适应分块建索引);增加:政企合规中心引擎 `engine/complianc

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
-17 | 增加:WPS AI 能力适配层(写作辅助/数据分析/PPT 生成/阅读助手),本地降级优先、自研逻辑实现、零密钥可用;增加:WPS AI 适配器 `engine/wps_ai/adapter.py`;增加:本地降级后端 `engine/wps_ai/backends/local_fallback.py`;增

The AirScript submission path supplies a successful safety result without performing the manifest's required precheck.

High
Category
Excessive Agency
Confidence
96% confidence
Finding

The submission tool accepts caller-supplied safety results and defaults to {"safe": true, "findings": []} when none are supplied, without invoking precheck_script(). This allows unscanned or dangerous scripts to enter the confirmation workflow with a fabricated clean assessment; the document-automation context makes resulting unauthorized overwrites, deletions, or disclosures consequential, although actual execution impact depends on downstream revalidation and authorization.

Content

No source excerpt is available for this finding.

Tainted flow: 'self.config' from pathlib.Path.read_text (line 18, file read) → requests.post (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 · engine/auth.py (reported line 39)May include surrounding context.

python
def _refresh_token(self):
        """使用 Client Credentials 获取 Token"""
        resp = requests.post(TOKEN_URL, data={
            "grant_type": "client_credentials",
            "client_id": self.config["appId"],
            "client_secret": self.config["appSecret"],

The generated weekly scan command invokes a runner that always scans zero documents.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

The generated scheduled command invokes a CLI that always supplies docs=[], never retrieves space documents, and receives success=True for scanning nothing. In a compliance-monitoring workflow, this silently disables the advertised detection control and can leave sensitive documents unexamined while scheduled executions appear successful.

Content

No source excerpt is available for this finding.

The advertised concurrent-edit conflict preservation is bypassed by the public cell-write path.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

Every public session write increments a shared server-side vector clock instead of accepting the writer's observed causal version, so stale writes appear causally newer and overwrite the current value without a conflict warning. This undermines the advertised collaborative integrity protection: simultaneous or deliberately stale edits can silently replace another user's changes, although prior operations remain in in-memory history.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · engine/form_to_bidata.py (reported line 79)May include surrounding context.

python
if not rule or value in (None, ""):
            return value
        try:
            return rule["serialize"](value)
        except Exception:
            return value

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · engine/form_to_bidata.py (reported line 89)May include surrounding context.

python
if not rule or value in (None, ""):
            return value
        try:
            return rule["deserialize"](value)
        except Exception:
            return value

Knowledge search fails open when a permission matrix is missing or empty.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

Missing and empty permission matrices both grant read access, including in cloud-backed mode. A search before permissions are loaded, after a refresh failure with no cached matrix, or with an intentionally empty deny-all matrix can expose restricted document titles and content snippets, contradicting the skill's claimed permission boundary.

Content

No source excerpt is available for this finding.

The advertised viewer-aware permission filtering does not use the requesting viewer's identity.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

The search method accepts viewer_id but never uses it, while permission entries are shared per space and document rather than per requesting principal. In a shared knowledge hub, a lower-privileged viewer can receive titles and snippets authorized under another user's or the backend service account's access.

Content

No source excerpt is available for this finding.

Remote operations are order-dependent despite explicit claims of commutativity and eventual convergence.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

A DELETE received before its corresponding INSERT is discarded, allowing subsequently inserted content to remain visible on some replicas but deleted on others. Position-based MOVE operations also depend on delivery order, so a collaborator able to influence operation timing can undermine document integrity despite the advertised convergence guarantees.

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 · engine/security.py (reported line 39)May include surrounding context.

python
# 3. 二进制镜像 / 安装包
    '.iso', '.dmg', '.zip', '.rar', '.7z', '.tar', '.gz', '.apk', '.jar',
    # 4. 系统缓存 / 隐藏文件
    '.ds_store', '.env', '.log', '.tmp',
    # 5. 其他风险脚本
    '.sh', '.com', '.scr', '.hta', '.reg',
}

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 · references/security.md (reported line 125)May include surrounding context.

md
# 3. 二进制镜像 / 安装包
    '.iso', '.dmg', '.zip', '.rar', '.7z', '.tar', '.gz', '.apk', '.jar',
    # 4. 系统缓存 / 隐藏文件
    '.ds_store', '.env', '.log', '.tmp',
    # 5. 其他风险脚本
    '.sh', '.com', '.scr', '.hta', '.reg',
}

Webhook events bypass the advertised signature validation when no signature is supplied.

High
Category
Excessive Agency
Confidence
100% confidence
Finding

An empty or omitted signature skips verification entirely, allowing anyone who can reach the event ingestion interface to submit forged events. Accepted payloads are persisted, dispatched to configured notification channels, and passed to the memory bridge, enabling false notifications and persistent memory poisoning.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/auth.md (reported line 155)May include surrounding context.

4.4 删除文档(软删除)

text
DELETE /personal/files/:file_id

⚠️ 删除后文档进入回收站,可恢复。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/auth.md (reported line 163)May include surrounding context.

4.5 彻底删除

text
DELETE /personal/files/:file_id/permanent

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/auth.md (reported line 282)May include surrounding context.

POST /et/formula/set # 设置公式 POST /et/sheets # 添加工作表 PUT /et/sheets/:sheet_id # 重命名工作表 DELETE /et/sheets/:sheet_id # 删除工作表

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/auth.md (reported line 294)May include surrounding context.

md
GET /dbt/tables/:table_id     # 获取表格结构
POST /dbt/fields              # 添加字段
PUT /dbt/fields/:field_id     # 修改字段
DELETE /dbt/fields/:field_id  # 删除字段
GET /dbt/views/:table_id      # 列出视图
POST /dbt/views               # 添加视图
POST /dbt/records             # 添加记录

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/dbt_references.md (reported line 60)May include surrounding context.

2.3 删除字段

text
DELETE /dbt/fields/:field_id

2.4 列出字段