Tool Parameter Abuse
- Category
- Tool Misuse
- Confidence
- 95% confidence
- Finding
The script deletes a directory using rm -rf with a path derived in part from the environment variable OPENCLAW_SKILLS_DIR. Although the path components are quoted, an attacker or unsafe caller can point OPENCLAW_SKILLS_DIR at an unintended location, causing destructive deletion of arbitrary directories matching the appended skill name during installation.
- Content
sh if [ -d "$OPENCLAW_SKILLS_DIR/$SKILL_NAME" ]; then echo "⚠️ 技能已存在,将覆盖..." rm -rf "$OPENCLAW_SKILLS_DIR/$SKILL_NAME" fi cp -r "$SKILL_DIR" "$OPENCLAW_SKILLS_DIR/$SKILL_NAME"
