T09 · Insecure Skill Coding Practices
- Location
scripts/create_agent.py:550- Finding
Unvalidated Agent and Workspace Paths Allow Arbitrary File Overwrite
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly an agent-creation helper, but it includes unsafe token-copying guidance and broad local write behavior that users should review before installing.
Install only if you understand that this skill will persistently change your OpenClaw agent files, workspace files, openclaw.json, and TEAM.md. Prefer dry-run first, avoid running it as root, use only trusted workspace paths, and do not follow the browser-token extraction guide; use an official scoped token or supported login flow and keep secrets out of shell history and source control.
scripts/create_agent.py:550Unvalidated Agent and Workspace Paths Allow Arbitrary File Overwrite
GET_TOKEN.md:88Authentication Token Exposed Through Command-Line Arguments
The document gives step-by-step instructions for extracting live authentication tokens from browser network traffic, cookies, and local storage, then reusing them on another server. Even though it briefly says tokens are like passwords near the end, the core behavior is credential harvesting and reuse, which materially increases the risk of account compromise, session theft, and unauthorized access.
These instructions explicitly direct the user to locate and copy authentication material from browser headers, cookies, storage, or account pages and then use it on a server for CLI publishing. In a skill context, that normalizes credential exfiltration and cross-environment reuse, which can enable unauthorized publishing, account takeover, or secret leakage if followed by someone without a clear security boundary.
The document presents all instructions in Chinese with no indication that language selection is optional or context-specific. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation unless clearly justified.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
- 在左侧请求列表中找包含 `api` 的请求
- 常见 URL 模式:
- `https://clawhub.ai/api/...`
- `https://api.clawhub.ai/...`
- `https://clawhub.biz/api/...`
**6. 查看请求头**
The documentation explicitly advertises automatic generation of agent files and updates to shared configuration such as openclaw.json and TEAM.md, but it does not prominently warn users that running the skill will perform local writes and mutate shared state. In a setup tool, undisclosed write behavior increases the risk of accidental configuration changes, overwriting existing data, or introducing unauthorized agent/binding entries through routine use.
The README states that the skill will automatically create agent directories and modify shared configuration files such as openclaw.json and TEAM.md, but it does not warn users about overwrite risk, merge conflicts, or unintended changes to existing local state. In an agent-management context, silent modification of global config and workspace files can disrupt other agents, corrupt configuration, or cause users to lose existing settings.
The README instructs users to place bot tokens and app secrets into configuration or environment variables, but it does not include guidance on protecting those credentials from disclosure, accidental commits, or insecure storage. Because these secrets grant control over external messaging integrations, mishandling them could lead to account compromise, impersonation, or abuse of connected channels.
The natural-language content of the skill description, usage instructions, warnings, and troubleshooting is presented exclusively in Chinese. This can violate a language or locale policy when no user opt-in or explicit region-specific scope is provided.
The script writes USER.md with a fixed communication language of 中文, which imposes a specific language preference on the generated agent configuration. This is a natural-language locale policy issue because the file does not offer any user choice or indicate that the language setting is optional or region-specific.
The script accepts a user-controlled --workspace path and later copies generated files into that location without constraining it to an approved base directory or checking for symlinks. When run with elevated privileges, an attacker or mistaken operator could overwrite files in arbitrary locations, including sensitive system or application paths, causing configuration corruption or privilege-impacting file placement.
if not args.dry_run:
import shutil
for f in ['IDENTITY.md', 'SOUL.md', 'AGENTS.md', 'USER.md']:
shutil.copy(agent_dir / f, workspace_dir / f)
log(f" 同步到工作区", 'success')
# 3. 更新 openclaw.json
Natural-language policy issues include forcing a specific language without user opt-in. This file presents all operational instructions in Chinese and does not state that the skill is region-specific or provide an alternative language option.
The natural-language content of the README is exclusively Chinese, including setup and operational instructions. Under the policy rule, forcing a specific language without user opt-in or a documented justification is a locale-policy concern.
No suspicious patterns detected.