From 3daa8f5b06b5c487cb3e49b0d271764ced9f678b Mon Sep 17 00:00:00 2001 From: cschantz Date: Tue, 23 Dec 2025 16:00:29 -0500 Subject: [PATCH] Auto-generate client report at scan completion Enhancement: Automatically create client report when scan finishes Changes: - Client report is now auto-generated at end of every scan - Report location prominently displayed in completion summary - Added helpful tip showing exact cat command to view report Before (old output): Results saved to: Summary: /opt/malware-.../results/summary.txt Logs: /opt/malware-.../logs/ After (new output): Results saved to: Summary: /opt/malware-.../results/summary.txt Logs: /opt/malware-.../logs/ Client Report (copy/paste for tickets): /opt/malware-.../results/client_report.txt TIP: To view the client-friendly report: cat /opt/malware-.../results/client_report.txt Workflow Improvement: - No need to remember to generate report manually - Client report always available immediately after scan - Clear instructions on how to access it - Report ready to copy/paste into support tickets This makes it much easier to quickly grab the client-facing report without navigating through menus or remembering commands. --- modules/security/malware-scanner.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/security/malware-scanner.sh b/modules/security/malware-scanner.sh index 132dfd2..7683406 100755 --- a/modules/security/malware-scanner.sh +++ b/modules/security/malware-scanner.sh @@ -1399,6 +1399,10 @@ else echo "⚠️ Scan Validation: $validation_issues issue(s) found - review logs" >> "$SUMMARY_FILE" fi +# Generate client report automatically +log_message "Generating client-facing security report" +generate_client_report "$SCAN_DIR" > /dev/null 2>&1 + # Display completion clear echo "==========================================" @@ -1411,6 +1415,9 @@ echo "Results saved to:" echo " Summary: $SUMMARY_FILE" echo " Logs: $LOG_DIR/" echo "" +echo -e "${CYAN}Client Report (copy/paste for tickets):${NC}" +echo " $RESULTS_DIR/client_report.txt" +echo "" # Show summary cat "$SUMMARY_FILE" @@ -1418,6 +1425,9 @@ cat "$SUMMARY_FILE" echo "" echo "==========================================" echo "" +echo -e "${CYAN}TIP:${NC} To view the client-friendly report:" +echo " cat $RESULTS_DIR/client_report.txt" +echo "" # Prompt for cleanup (RKHunter cleanup handled by trap) read -p "Delete scan script? (Logs and results will be preserved) (yes/no): " cleanup_choice