subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if check_cron_setup(): return True, "定时任务已存在" result = subprocess.run( [ "openclaw", "cron", "add", "--name", "chat-history-archive",- Confidence
- 86% confidence
- Finding
- This code creates a scheduled `system-event` that later causes execution of `python3 {main_py_path} --archive`. Although `subprocess.run` is not using a shell here, it is registering a command-like string with another scheduler, so any unsafe characters in `main_py_path` could be reinterpreted later by the downstream executor. The skill context makes this more sensitive because it establishes persistent automation, not just a one-time process spawn.
