T09 · Insecure Skill Coding Practices
- Location
scripts/recruit-agent.sh:111- Finding
Arbitrary JavaScript Execution Through Unsafely Interpolated Agent Parameters
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This appears to be a real OpenClaw agent-creation helper, but it uses unsafe setup scripts and templates that can copy credentials, change persistent routing, and give new agents broad system powers without enough scoping.
Install only after reviewing and hardening the recruitment script. Require strict validation for agent IDs and group IDs, remove inline JavaScript interpolation, do not copy another agent's auth profile by default, replace hard-coded Feishu destinations with user-approved placeholders, and make maintenance agents report-only unless the user explicitly approves each state-changing action.
scripts/recruit-agent.sh:111Arbitrary JavaScript Execution Through Unsafely Interpolated Agent Parameters
scripts/recruit-agent.sh:8Directory Traversal and Arbitrary File Placement Through Unvalidated Agent ID
scripts/recruit-agent.sh:42Cross-Agent Credential Exposure Through Automatic Authentication Profile Cloning
templates/examples/tim/SOUL.md:92Hard-Coded Feishu Group Redirect in Automatically Installed Tim Instructions
The primary description is written as '招聘 Agent 工具' and the document consistently presents instructions in Chinese, with no indication that users may choose another language or locale. Under the policy rule for natural-language violations, this is a locale/language constraint presented without opt-in or justification.
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.
mkdir -p ~/.openclaw/agents/<agent_id>/agent
mkdir -p ~/.openclaw/workspace-<agent_id>
This markdown file presents the skill's name, role, usage guidance, and success metrics entirely in Chinese, which can impose a specific language on users without any stated opt-in or alternative locale. Under the policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is documented and justified.
该文件内容完整定义了“Mike 金融分析师”的身份、市场数据采集、行情分析、群聊推送和异常波动预警等行为,与 skill manifest 声明的“招聘 Agent 工具 - 创建、配置和管理 OpenClaw Agent”明显不一致。虽然作为模板示例文件存在一定合理性,但从当前技能声明来看,这属于超出所述招聘/配置用途的行为描述。
The skill hardcodes a delivery time in the Asia/Shanghai timezone and presents itself entirely as a Chinese-language financial analyst persona, with no indication that users can choose another language or locale. This can violate language/locale policy when the skill is used in broader contexts without explicit opt-in or justification.
The template instructs automatic push to a group chat and logging to a memory file, but it does not specify consent, data classification, retention limits, or safeguards on what may be stored. In an agent system, this can cause sensitive market notes, user preferences, identifiers, or other operational data to be sent or persisted automatically without adequate notice or control.
This markdown file presents the skill persona and usage guidance entirely in Chinese, including role, traits, and operational descriptions, without offering a language choice or documenting a region-specific reason. That can violate a language/locale policy when users have not opted into Chinese output.
The file is written as a Chinese-only persona and operating specification, with no indication that the user can choose another language or locale. This creates a natural-language policy concern because it effectively imposes a specific language without opt-in.
The template broadens an agent-recruitment skill into a system maintenance and auto-remediation persona with authority to monitor, diagnose, and influence operational components. That expansion increases privilege and action scope beyond the stated skill purpose, making accidental misuse, unsafe automation, or repurposing of created agents more likely.
The template instructs the agent to record historical failures, fixes, baseline state, and memory artifacts without any minimization, consent, or sensitivity constraints. In an ops context, those records can easily accumulate system identifiers, operational details, or user-related data that become a privacy and security exposure if stored insecurely or retained indefinitely.
This section grants the created agent broad operational responsibilities such as health checks, incident analysis, repair guidance, and execution workflows that are not directly required for recruiting/configuring an agent. In context, that makes the resulting agent a generalized ops actor, which can drive impactful system changes if its instructions are followed without strict authorization controls.
The template advertises automatic repair, batch configuration updates, backups/rollback, and self-healing behavior without clear user-facing warnings or mandatory authorization checks. In a maintenance context, automated changes to services and configurations can cause outages, destructive misconfiguration, or unintended privilege use if triggered too broadly or based on incorrect diagnosis.
The generated USER.md sets the user's timezone to "Asia/Shanghai" by default. This imposes a specific locale assumption in natural-language content without offering a choice or documenting that it is region-specific.
该模板要求“所有变更必须记录到 memory 文件”,并在后文要求积累故障模式、知识库和趋势信息。这为被创建 Agent 引入持续性运维知识沉淀能力,但 manifest 仅表述为创建和配置 Agent,并未说明会部署长期系统记忆/维护档案能力。