subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: os.kill(pid, signal.SIGTERM) # 也杀所有同名进程(防残留) subprocess.run( ["pkill", "-f", "recorder_status"], capture_output=True, )- Confidence
- 92% confidence
- Finding
- The code unconditionally runs `pkill -f recorder_status`, which matches against full command lines for all processes owned by the user. This can terminate unrelated processes whose command line happens to contain that string, creating an availability issue and a dangerous kill primitive in a long-running automation context.
