T09 · Insecure Skill Coding Practices
- Location
scripts/create_agent.sh:222- Finding
Command Injection Through Unsafe GNU sed Replacement
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This agent-creation skill is mostly purpose-aligned, but it performs persistent OpenClaw configuration changes and contains real input-handling flaws that could let crafted agent names or IDs corrupt files or execute commands.
Install only after review or patching. Expect it to create persistent agent workspaces and modify the global OpenClaw config. Do not let untrusted users or prompts choose agent IDs or names until the sed templating, post-sanitization ID validation, predictable temp file, and hardcoded USER.md identity are fixed.
scripts/create_agent.sh:222Command Injection Through Unsafe GNU sed Replacement
scripts/create_agent.sh:35Post-Sanitization Empty Agent ID Escapes the Intended Agent Workspace
scripts/create_agent.sh:234Predictable Temporary Configuration File Enables Symlink and Race Attacks
The skill advertises agent creation and switching, but the documentation also reveals privileged side effects: automatic creation of many files and modification of the global OpenClaw configuration. That mismatch is dangerous because users may invoke a seemingly simple management skill without understanding it performs persistent filesystem writes and changes shared runtime state, which can enable persistence, misconfiguration, or unintended agent capabilities.
The skill's natural-language description and usage instructions are presented in Turkish throughout the file, which effectively forces a specific language for users. The file does not offer an alternative language, user opt-in, or a documented reason for a Turkish-only locale constraint.
The create-agent flow states that files are automatically created, but it does not clearly warn that this is a persistent write operation affecting agent state and configuration. In a skill that provisions new agents, hidden persistence is security-relevant because it can surprise operators, complicate auditing, and create attack surface through generated files and config entries.
The documentation highlights Google Sheets access and cron job creation as available to all generated agents but does not warn that these are write-capable integrations and persistence mechanisms. In this context, granting every new agent spreadsheet modification and scheduled task capability increases the blast radius if an agent is misused or prompted maliciously.
This shell script performs safety-relevant file creation throughout the agent workspace and later modifies the shared configuration file, but it does so immediately once required arguments are present. Although there are progress messages, there is no user confirmation step warning that persistent filesystem and config changes will be made.
The script hardcodes a specific person's name into every generated USER.md, causing unnecessary propagation of personal data to all new agent workspaces. This creates privacy risk, can misattribute ownership or identity across agents, and may expose personal information to other users, tools, backups, or logs without consent.
The manifest describes this skill as creating agents and switching between agents. In addition to creating agent files and updating config, the script prepares a dedicated cron directory, generates cron documentation, and creates a sample scheduled task file with instructions to copy it into the global cron area, introducing task-scheduling capability not justified by the stated purpose.
User-facing comments, usage text, prompts, and generated markdown content are written exclusively in Turkish, which imposes a language choice by default. The file does not indicate that the skill is intentionally restricted to Turkish-speaking users or provide any opt-in language selection.
The script writes guidance into SOUL.md that includes 'Dışarıya veri gönderme' as a boundary, which reads as a prohibition on sending data outward. But later it generates TOOLS.md stating the agent is accessed via Telegram and WhatsApp, and HEARTBEAT.md comments mention heartbeat API calls, creating contradictory embedded intent documentation about external communication.
No suspicious patterns detected.