subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
env = {k: v for k, v in os.environ.items() if k != "CLAUDECODE"} process = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, cwd=str(project_root), env=env, )- Confidence
- 88% confidence
- Finding
- This code launches an external CLI (`claude`) based on user-controlled inputs such as query, model, and detected project root, and it does so against the live repository context. Although it avoids `shell=True`, the security issue is the capability itself: running a powerful agentic tool on untrusted probe content can cause unintended side effects, network access, or tool execution in the current workspace.
