From dc6ce93eefbaf42863a477baf465410e0901f33a Mon Sep 17 00:00:00 2001 From: Developer Date: Thu, 23 Apr 2026 20:27:22 -0400 Subject: [PATCH] CRITICAL FIX: Guard unprotected header_score comparison at line 1815 Line 1815: Changed from [ "$header_score" -ge 8 ] to [ "${header_score:-0}" -ge 8 ] - This was another unprotected array variable access in the threat scoring loop - Missed in previous fix - now ALL array accesses in scoring loop are guarded This ensures script continues past 'Calculating threat scores...' phase. --- modules/security/bot-analyzer.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/security/bot-analyzer.sh b/modules/security/bot-analyzer.sh index 0d79385..f372b05 100755 --- a/modules/security/bot-analyzer.sh +++ b/modules/security/bot-analyzer.sh @@ -1812,7 +1812,7 @@ calculate_threat_scores() { header_score=${header_anomalies[$ip]:-0} if [ "${header_score:-0}" -ge 12 ]; then score=$((score + 8)) # Multiple header suspicions - elif [ "$header_score" -ge 8 ]; then + elif [ "${header_score:-0}" -ge 8 ]; then score=$((score + 5)) # Moderate header anomalies fi fi