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.
This commit is contained in:
cschantz
2025-12-23 16:00:29 -05:00
parent 5d926a223d
commit cdaed9f75a
+10
View File
@@ -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