T09 · Insecure Skill Coding Practices
- Location
scripts/yuque_client.py:41- Finding
Yuque token can be transmitted to an untrusted configurable destination
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Yuque skill is coherent for document automation, but it grants broad account-level document access with unsafe defaults that could expose tokens or unintentionally modify/delete content.
Review this skill carefully before installing. Use a least-privilege Yuque token, keep the default official API URL unless you trust a private deployment, back up important repositories before TOC or batch operations, and require explicit approval before delete, raw API, import, replace, or TOC remove actions.
scripts/yuque_client.py:41Yuque token can be transmitted to an untrusted configurable destination
scripts/toc.py:122Removing a TOC node deletes the underlying document by default
scripts/batch.py:102Repository-wide regular-expression replacement writes changes by default
scripts/format_helpers.py:61Markdown helpers permit HTML attribute injection and provide incomplete sanitization
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).
rm -rf ~/.openclaw/skills/yuque
unset YUQUE_TOKEN YUQUE_BASE_URL
rm -f ~/.yuque/config.json
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).
rm -rf ~/.openclaw/skills/yuque
unset YUQUE_TOKEN YUQUE_BASE_URL
rm -f ~/.yuque/config.json
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).
rm -rf ~/.openclaw/skills/yuque
unset YUQUE_TOKEN YUQUE_BASE_URL
rm -f ~/.yuque/config.json
This mismatch is security-relevant because the finding indicates the code may expose a lower-level raw API request primitive capable of arbitrary GET/POST/PUT/DELETE beyond the declared high-level use case. A skill presented as narrow Yuque document automation but actually permitting generic API calls can be abused for unintended data access, modification, or destructive operations under the user's token.
This mismatch is security-relevant because the finding indicates the code may expose a lower-level raw API request primitive capable of arbitrary GET/POST/PUT/DELETE beyond the declared high-level use case. A skill presented as narrow Yuque document automation but actually permitting generic API calls can be abused for unintended data access, modification, or destructive operations under the user's token.
This mismatch is security-relevant because the finding indicates the code may expose a lower-level raw API request primitive capable of arbitrary GET/POST/PUT/DELETE beyond the declared high-level use case. A skill presented as narrow Yuque document automation but actually permitting generic API calls can be abused for unintended data access, modification, or destructive operations under the user's token.
This mismatch is security-relevant because the finding indicates the code may expose a lower-level raw API request primitive capable of arbitrary GET/POST/PUT/DELETE beyond the declared high-level use case. A skill presented as narrow Yuque document automation but actually permitting generic API calls can be abused for unintended data access, modification, or destructive operations under the user's token.
The skill instructs automatic invocation whenever broad keywords like 'Yuque', 'knowledge base', 'document directory', or 'TOC' appear, regardless of whether the user actually requested an external action. In a skill with network, file, and credential use, such broad trigger rules can cause unnecessary exposure of tokens, accidental reads/writes, or unintended remote operations from casual discussion alone.
The skill documentation is presented entirely in Chinese from the title onward, with no indication that other languages are supported or that the language choice is optional. Per the policy rule, forcing a specific language without user opt-in is a natural-language policy concern.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
前提:先从 Releases 下载
yuque.skill,解压后得到yuque-skill/目录,再执行:
mkdir -p ~/.openclaw/skills/
cp -r yuque-skill ~/.openclaw/skills/yuque
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
前提:先从 Releases 下载
yuque.skill,解压后得到yuque-skill/目录,再执行:
mkdir -p ~/.openclaw/skills/
cp -r yuque-skill ~/.openclaw/skills/yuque
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
"base_url": "https://www.yuque.com/api/v2" } EOF chmod 600 ~/.yuque/config.json
## 三、自检
The skill advertises and instructs use of capabilities that inherently access environment variables, local files, and the network, yet it declares no explicit tool scope or permission boundaries. That creates an overprivileged integration surface where the runtime may grant broader access than users or reviewers expect, increasing the blast radius of prompt injection, misuse, or implementation bugs.
The usage guidance says mentioning 'Yuque' or 'yuque' is sufficient to use the skill, without requiring context that the user wants account access or document operations. This overly broad activation logic increases the chance of privacy-invasive or destructive actions being initiated from ambiguous prompts, especially given the skill's stated support for CRUD and bulk operations.
“用人话告诉用户做了什么”后给出的唯一示例和整份说明均默认中文语境,且文件没有说明应根据用户语言偏好切换输出语言。对于组织语言/locale 政策,若默认强制单一语言而无用户选择,可能构成自然语言策略违规。
This markdown reference lists create, update, and delete repository operations, including DELETE /repos/:namespace, but does not include any warning that these actions can modify or permanently remove user data. Under the markdown-specific warning criterion, skills describing behaviors that affect user data or system integrity should disclose that risk clearly.
The file describes POST, PUT, and DELETE operations for documents and later TOC mutation actions such as removeNode and delete_doc, but provides no accompanying caution about the risk of altering or deleting content. Because this is a markdown skill reference that describes data-affecting behavior, an explicit warning is expected.
The delete subcommand performs a destructive document deletion via client.delete_doc(...) but provides no confirmation prompt, warning comment/docstring, or user-facing disclosure at the point of execution. For a code file, destructive or irreversible operations should have some visible warning unless clearly disclosed elsewhere in the skill description, which is not present in this file.
This code embeds user-facing natural-language descriptions in Chinese only, including the module docstring and command descriptions. The policy forbids forcing a specific language without user opt-in unless the locale restriction is clearly documented and justified, which is not present here.
The CLI description and help strings shown to users are fixed to Chinese, which can impose a language choice on all users. There is no indication that the user can select a locale, nor any documented justification for a Chinese-only interface.
The remove command sets delete_doc to true by default unless --keep-doc is supplied, so a user intending only to remove a TOC entry can accidentally delete the underlying Yuque document. In an automation skill that proactively operates on knowledge bases and documents, this default materially increases the risk of unintended destructive actions and irreversible content loss.
This Python code exposes a raw CLI command that allows arbitrary POST/PUT/DELETE requests to the Yuque API, which can modify or delete remote user data. While the file documents general API usage, these destructive-capable operations have no confirmation prompt or explicit user-facing warning in the CLI help strings around the command itself.
All natural-language guidance in this file is Chinese, and there is no indication that the skill is intentionally limited to Chinese-speaking users or that another language option is available. Per the language/locale policy, forcing a specific language without user opt-in can be a policy violation.
This markdown file presents all guidance in Chinese and does not indicate that the language is optional, selectable, or required for a region-specific audience. Under the policy rule for language/locale constraints, forcing a single language without user opt-in can be a natural-language policy violation.