T09 · Insecure Skill Coding Practices
- Location
SKILL.md:139- Finding
Configuration-changing recovery commands are incorrectly classified as read-only
- Content
View full analysis
" ``` ``` ### Technical Analysis The Skill places `openclaw doctor --fix` under a section explicitly described as “read-only, no side effects.” The `--fix` option indicates that the command may repair and therefore modify configuration or state. The exact changes performed depend on the installed OpenClaw implementation, but it is not safe to represent a repair operation as read-only. The BOM-removal routine unambiguously modifies the selected configuration file through `fs.writeFileSync`. It overwrites the original file in place without: - Obtaining explicit user approval. - Creating a backup. - Confirming that the resolved path is the intended OpenClaw configuration. - Validating the resulting JSON before replacement. - Preserving metadata or handling concurrent writes. - Using an atomic temporary-file-and-rename operation. This discrepancy can cause an agent to execute configuration-changing operations under the mistaken assumption that they are diagnostic only. Although no direct command injection was identified in the fixed Node.js command, an incorrect, stale, or attacker-influenced configuration path could cause the same-user process to overwri ...[truncated 1543 chars]- Remediation
View remediation
