Fix HIGH priority issues: library exit, unquoted paths, and globs

Fixed multiple HIGH severity issues found by QA scan:

1. Library exit usage (lib/http-attack-analyzer.sh):
   - Changed exit 1 to return 1
   - Libraries should return, not exit (would terminate caller)

2. Unquoted path expansions (9 fixes):
   - cleanup-toolkit-data.sh: Quoted $pattern in ls/rm commands
   - hardware-health-check.sh: Quoted /sys/block/$disk/queue paths
   - plesk-helpers.sh: Quoted /var/qmail/mailnames/$domain path
   - Prevents breakage with paths containing spaces

3. Unquoted globs in rm commands (3 fixes):
   - erase-toolkit-traces.sh: Quoted glob patterns
   - Prevents unintended file deletion from glob expansion

All changes improve robustness and prevent edge case failures.
This commit is contained in:
cschantz
2026-01-02 16:39:57 -05:00
parent a5d61ea7d8
commit 8f6cb6e91c
5 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -9,7 +9,7 @@
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/attack-signatures.sh" 2>/dev/null || {
echo "ERROR: attack-signatures.sh not found" >&2
exit 1
return 1
}
# Analyze a single HTTP request log line