subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 执行外部通知命令 try: cmd = f'{notify_cmd} "{title}" "{message[:1500]}"' result = subprocess.run(cmd, shell=True, capture_output=True, text=True, timeout=30) if result.returncode == 0: print(f"✓ 通知已发送") return True- Confidence
- 99% confidence
- Finding
- The code builds a shell command from configurable `notify_cmd` plus dynamic `title` and `message` content, then executes it with `shell=True`. Because paper metadata and generated summaries can contain quotes or shell metacharacters, this creates command-injection risk and allows arbitrary command execution under the skill's privileges.
