T09 · Insecure Skill Coding Practices
- Location
scripts/coordinator.sh:106- Finding
Arbitrary Python Code Execution Through Shell Argument Interpolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a multi-agent helper, but its bundled scripts handle task and worker inputs unsafely enough to risk local file changes or command execution if given crafted values.
Review before installing. Do not run the bundled scripts with untrusted task names, worker IDs, or results, and avoid enabling exec/process for subagents until the author adds strict input validation, safe JSON serialization, confirmation for deletion, and clear permission limits.
scripts/coordinator.sh:106Arbitrary Python Code Execution Through Shell Argument Interpolation
scripts/coordinator.sh:89Path Traversal Through Unvalidated Task and Worker Identifiers
scripts/coordinator.sh:53JSON Injection and State Corruption Through Manual JSON Construction
The description presents this skill as a functioning multi-agent parallel work system with coordinator behavior, task distribution, and result summarization based on OpenClaw sessions_spawn. The supplied code does not implement those core behaviors. It only validates arguments, creates a log directory, writes a simple log entry, generates a default label, and prints explanatory text claiming OpenClaw will do the rest. There is no actual sessions_spawn call, no subagent creation, no coordinator logic, no task routing, and no result collection. This is a material description-behavior mismatch because the primary advertised capability is absent from the implementation.
The description promises a multi-agent parallel work system built on OpenClaw sessions_spawn with coordinator mode, task assignment, and result summarization. The code only provides lightweight local team bookkeeping in shell/Python: it creates team.json and worker.json files, updates status fields, lists them, and deletes them. There is no invocation of OpenClaw session spawning, no process/thread management, no coordinator logic, and no true parallel execution. The code’s primary purpose is team/worker state tracking rather than an operational multi-agent collaboration engine. There is also a functional bug where the main dispatcher calls leave_worker, but the defined function is leave_team.
rm -rf "$TEAM_DIR/workers/$worker_id" uses a path derived from untrusted input without canonicalization or strict validation. An attacker could supply traversal sequences such as ../../... to delete files or directories outside the intended workers area, leading to destructive arbitrary file deletion within the user's permissions.
return 1
fi
rm -rf "$TEAM_DIR/workers/$worker_id"
# 从团队成员中移除
python3 << PYEOF
Bulk cleanup removes the entire workers directory recursively without any confirmation or backup, causing immediate loss of all worker state. In this skill's coordination context, that can wipe active task tracking and results for all agents, creating a high availability and integrity impact.
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).
done
# 清理目录
rm -rf "$TEAM_DIR/workers"
mkdir -p "$TEAM_DIR/workers"
echo "✅ 清理完成"
Without declared permissions the skill's intent is opaque and cannot be validated.
The trigger example uses broad natural-language phrasing like '帮我同时处理...' that could overlap with ordinary user requests, increasing the chance of accidental invocation. In a skill that discusses spawning multiple workers and parallel execution, unintended activation can amplify actions, consume resources, or cause task execution the user did not explicitly intend.
The documentation grants subagents potentially dangerous capabilities such as 'exec' and 'process' but does not warn users about command-execution, lateral action, or resource-abuse risks. In a multi-agent context, these permissions are more dangerous because tasks can be parallelized and delegated, increasing the blast radius of mistakes or malicious prompts.
This shell script is a code file, so SQP-3 applies to its natural-language strings. The example invocation and all demonstrated agent commands are presented only in Chinese, effectively prescribing a specific language for user interaction without any opt-in or explanation that the skill is region-specific.
The script persists the full task string to a markdown log under the user's home directory without any minimization, redaction, consent prompt, or retention controls. In a multi-agent workflow, tasks may contain sensitive prompts, source snippets, credentials, incident details, or proprietary data, so this creates a realistic confidentiality risk if the log is later read by other tools, users, backups, or synced storage.
User-facing comments, status messages, and help text are consistently presented in Chinese, but the script does not offer any language selection or explain that it is intended only for a Chinese-speaking context. This creates a language-policy issue because the skill effectively forces a specific language without user opt-in.
The header and function comments state that the script can start work agents and, during cleanup, stop running workers. In practice, startup only writes worker.json metadata, and cleanup merely prints a message with a comment acknowledging that a stop signal should be sent, so the documentation overstates the implemented behavior.
The manifest describes a multi-agent parallel work system based on OpenClaw session spawning, coordinator mode, task assignment, and result aggregation. In this file, the advertised worker startup path only creates directories and JSON records, with no call to any agent runtime, session spawn mechanism, or coordinator logic, so the implemented behavior is a bookkeeping stub rather than the claimed multi-agent execution capability.
The script includes destructive state-removal operations that exceed simple coordination and are exposed without safeguards. In a multi-agent skill context, deleting worker state can cause denial of service, loss of audit/history data, and accidental destruction of unrelated files if path inputs are abused.
The script performs irreversible deletion of worker data via rm -rf without any confirmation, dry-run, or warning. Because the deletion target incorporates a user-supplied worker_id, accidental or malicious path manipulation could remove more data than intended and disrupt the system.
Natural-language strings in comments, usage examples, and runtime output are presented only in Chinese, which can violate language/locale policy when no user opt-in or justification is provided. The file does not indicate that the skill is intentionally limited to a Chinese-speaking audience or region-specific environment.