T03 · Remote Payload Retrieval and Execution
- Location
scripts/ensure_python_env.sh:84- Finding
Unverified Remote Installer Download and Execution
- Content
View full analysis
/dev/null; then log_info "使用 PowerShell 安装 uv..." powershell.exe -ExecutionPolicy ByPass -Command \ "irm https://astral.sh/uv/install.ps1 | iex" else log_error "未找到 powershell.exe,请手动安装 uv:" log_error " https://docs.astral.sh/uv/getting-started/installation/" exit 1 fi export PATH="$USERPROFILE/.local/bin:$HOME/.local/bin:$PATH" else if command -v curl &>/dev/null; then log_info "使用 curl 安装 uv..." curl -LsSf https://astral.sh/uv/install.sh | sh elif command -v wget &>/dev/null; then log_info "使用 wget 安装 uv..." wget -qO- https://astral.sh/uv/install.sh | sh ``` The Python implementation performs the same operation: ```python if is_windows(): ps = shutil.which("powershell.exe") or shutil.which("powershell") if not ps: log_error("未找到 PowerShell,请手动安装 uv:") log_error(" https://docs.astral.sh/uv/getting-started/installation/") sys.exit(1) log_info("使用 PowerShell 安装 uv...") result = subprocess.run( [ps, "-ExecutionPolicy", "ByPass", "-Command", "irm https://astral.sh/uv/install.ps1 | iex"], check=False, ) if result.returncode != 0: log_error("PowerShell 安装 uv 失败,请手动安装:") log_error(" https://docs.astral.sh/uv/getting-started/installation/") sys.exit(1) else: curl = shutil.which("curl") wget = shutil.which("wget") if curl: log_info("使用 curl 安装 uv...") proc = subprocess.run([curl, "-LsSf", "https://astral.sh/uv/install.sh"], stdout=subprocess.PIPE, check=True) subproc ...[truncated 2945 chars]- Remediation
View remediation
