diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 785e21d..aa159b0 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -285,9 +285,9 @@ install_maldet_only() { rm -f "$temp_file" fi - # Get latest release dynamically from GitHub API + # Get latest release dynamically from GitHub API (with timeout) local latest_release - latest_release=$(curl -s "https://api.github.com/repos/rfxn/linux-malware-detect/releases/latest" 2>/dev/null | grep -o '"tag_name":"[^"]*' | head -1 | cut -d'"' -f4) + latest_release=$(curl -s --connect-timeout 5 --max-time 10 "https://api.github.com/repos/rfxn/linux-malware-detect/releases/latest" 2>/dev/null | grep -o '"tag_name":"[^"]*' | head -1 | cut -d'"' -f4) # Download sources in priority order # Format: "name|url|label" (using | as delimiter to avoid splitting https://)