subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
try: subprocess.run(["launchctl", "stop", "com.fink.clawshorts"], timeout=5) time.sleep(1) subprocess.run(["pkill", "-9", "-f", "clawshorts-daemon.py"], timeout=10) time.sleep(1) except subprocess.TimeoutExpired: _log("Kill command timed out")- Confidence
- 78% confidence
- Finding
- Using pkill -9 -f with a broad pattern can terminate any process whose full command line matches clawshorts-daemon.py, not just the intended daemon instance. If another local process can be named or launched to match that pattern, this healthcheck can be induced to kill unintended processes, creating a local denial-of-service condition.
