From 5d7658efe596edd33a700766df3f8b11c22d08be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Mart=C3=ADn?= Date: Thu, 6 Jun 2024 16:06:02 +0200 Subject: [PATCH] fix(html): handle muted status to html outputs (#4195) Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com> --- prowler/lib/outputs/html/html.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/prowler/lib/outputs/html/html.py b/prowler/lib/outputs/html/html.py index e2c24fb405..2f8a828a9d 100644 --- a/prowler/lib/outputs/html/html.py +++ b/prowler/lib/outputs/html/html.py @@ -136,12 +136,14 @@ def fill_html(file_descriptor, finding): try: row_class = "p-3 mb-2 bg-success-custom" finding.status = finding.status.split(".")[0] + # Change the status of the finding if it's muted + if finding.muted: + finding.status = f"MUTED ({finding.status})" + row_class = "table-warning" if finding.status == "MANUAL": row_class = "table-info" elif finding.status == "FAIL": row_class = "table-danger" - elif finding.status == "WARNING": - row_class = "table-warning" file_descriptor.write( f"""