subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
return {"status": "error", "message": f"Evidence script not found: {script_path}"} try: result = subprocess.run( ["python3", script_path, "--test-connection"], capture_output=True, text=True, timeout=30 )- Confidence
- 96% confidence
- Finding
- The code executes an external companion script via subprocess based on a discovered local skill path. Although shell injection is mitigated by passing an argument list, this still creates a trust-boundary violation: any installed companion skill at that path gets executed with the current process privileges, so a malicious or tampered companion package can run arbitrary code. In a GRC skill that also handles credentials and sensitive evidence, this materially increases risk.
