ed584b8451
Issues Fixed:
1. cPanel jailshell users flagged as suspicious
- jailshell is a legitimate cPanel shell (like noshell)
- Users with jailshell were incorrectly flagged
- Fix: Added jailshell to shell filter regex
2. Integer expression errors when risk_score is empty/invalid
- Line 2668, 2709, 2728: Unvalidated risk_score in comparisons
- If risk_score is empty or non-numeric: "integer expression expected"
- Fix: Added validation and default value
Changes:
- Line 2271: if (shell ~ /\/noshell$/ || shell ~ /\/jailshell$/) next
- Line 2663: local risk_score=${2:-0} (default to 0)
- Added: regex validation for risk_score
- Quoted all $risk_score comparisons for safety
Testing:
✓ Syntax validation passed
✓ jailshell filter tested (correctly ignores jailshell users)
✓ Risk score validation prevents empty/invalid values
Result: Eliminates false positives for cPanel jailshell users
and prevents "integer expression expected" errors
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>