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:
@@ -293,3 +293,10 @@ format_threat_display() {
|
||||
echo " URI: ${URI:0:100}"
|
||||
[ -n "$SIGNATURES" ] && echo " Signatures: $SIGNATURES"
|
||||
}
|
||||
|
||||
# Export functions for use in subshells
|
||||
export -f analyze_http_log_line
|
||||
export -f analyze_http_log_batch
|
||||
export -f monitor_http_log_realtime
|
||||
export -f parse_http_analysis_result
|
||||
export -f format_threat_display
|
||||
|
||||
Reference in New Issue
Block a user