subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _stop_chrome(): """关闭Chrome""" try: subprocess.run(["pkill", "-f", "chrome.*9222"], timeout=5, capture_output=True) except: pass- Confidence
- 80% confidence
- Finding
- The code terminates processes using a broad pkill -f pattern of chrome.*9222, which matches against full command lines and can kill unintended processes that happen to match. In an automation environment shared with other workloads, this can cause denial of service or disrupt unrelated Chrome instances, and the skill context makes this more dangerous because it persistently runs a browser with remote debugging enabled.
