subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _run_fix(cmd: str) -> tuple[bool, str]: """执行修复命令,返回 (成功, 输出)。""" try: result = subprocess.run( cmd, shell=True, capture_output=True, text=True, timeout=120 ) out = (result.stdout + result.stderr).strip()- Confidence
- 98% confidence
- Finding
- result = subprocess.run( cmd, shell=True, capture_output=True, text=True, timeout=120 )
