From 912960ac91ad255c71eeda25bcef8d127a5be49f Mon Sep 17 00:00:00 2001 From: Kremilly Date: Wed, 11 Dec 2024 16:07:34 -0300 Subject: [PATCH] feat: update HTML report to use Bootstrap 5 and enhance navigation with app name --- src/plugins/reports_xss.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/plugins/reports_xss.rs b/src/plugins/reports_xss.rs index d0c26a6..ae83cc5 100644 --- a/src/plugins/reports_xss.rs +++ b/src/plugins/reports_xss.rs @@ -10,6 +10,7 @@ use std::{ use crate::{ utils::file::FileUtils, + constants::global::Global, ui::report_alerts::ReportAlerts, handlers::reports_handlers::ReportsHandlers, }; @@ -83,9 +84,17 @@ impl ReportsXSS { pub fn html(&self, detections: Vec<(String, usize, String, String)>, output_path: &str) -> Result<(), Box> { let mut file = File::create(output_path)?; - file.write_all(b"XSS Reports")?; + file.write_all(b"XSS Reports")?; file.write_all(b"")?; - file.write_all(b"
")?; + + file.write_all(format!( + "", + Global::APP_NAME + ).as_bytes())?; + + file.write_all(b"
")?; file.write_all(b"")?; for (table, row_index, column, value) in detections {
TableRow IndexColumnValue