Add missing function exports to library files

QA scan found 4 library files with functions that weren't exported,
making them unavailable in subshells and nested calls.

Added export statements for:
- lib/attack-signatures.sh: 3 functions
- lib/http-attack-analyzer.sh: 5 functions
- lib/email-functions.sh: 18 functions
- lib/rate-anomaly-detector.sh: 9 functions

Total: 35 functions now properly exported

This ensures functions are available when libraries are sourced by
scripts that spawn subshells or use process substitution.
This commit is contained in:
cschantz
2026-01-02 16:23:17 -05:00
parent 87c69cd59b
commit 682bd69cf8
4 changed files with 43 additions and 0 deletions
+11
View File
@@ -246,3 +246,14 @@ start_rate_cleanup_task() {
echo $! # Return PID of cleanup task
}
# Export functions for use in subshells
export -f record_request
export -f detect_rate_anomaly
export -f analyze_request_pattern
export -f cleanup_rate_tracking
export -f get_current_rate
export -f is_flooding
export -f format_rate_anomaly
export -f init_rate_tracking
export -f start_rate_cleanup_task