subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not main_py: return (True, "未探测到主脚本(scripts/main.py 等),跳过冒烟(不阻断)") try: r = subprocess.run([sys.executable, main_py, "--help"], capture_output=True, text=True, encoding="utf-8", timeout=60) except subprocess.TimeoutExpired: return (False, f"主脚本 --help 超时(疑似死循环/阻塞): {main_py}")- Confidence
- 88% confidence
- Finding
- The script executes a target skill's detected main Python file as part of a '--help' smoke test. Because the target directory is attacker-controlled input, a malicious skill can place arbitrary code in its entrypoint and that code will run during injection/check, turning validation into code execution.
