Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(html): handle muted status to html outputs #4195

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions prowler/lib/outputs/html/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@
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"

Check warning on line 142 in prowler/lib/outputs/html/html.py

View check run for this annotation

Codecov / codecov/patch

prowler/lib/outputs/html/html.py#L140-L142

Added lines #L140 - L142 were not covered by tests
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"""
Expand Down