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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

pedrooot
Copy link
Member

@pedrooot pedrooot commented Jun 6, 2024

Context

Fixes #4181

Description

Muted FIndings appeared as Pass/Fail/Manual, it's necessary to handle the case when the finding it's muted on HTML outputs.

Thanks @alanrickman-keysight for the report 🥇

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 86.66%. Comparing base (f3c6720) to head (b16cbe1).
Report is 7 commits behind head on master.

Files Patch % Lines
prowler/lib/outputs/html/html.py 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4195      +/-   ##
==========================================
- Coverage   86.76%   86.66%   -0.10%     
==========================================
  Files         817      818       +1     
  Lines       25599    25674      +75     
==========================================
+ Hits        22211    22251      +40     
- Misses       3388     3423      +35     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@puchy22
Copy link
Contributor

puchy22 commented Jun 6, 2024

Thanks @pedrooot! 💯

Comment on lines 146 to 147
elif finding.status == "WARNING":
row_class = "table-warning"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer needed in v4

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

Comment on lines 148 to 149
elif "Muted" in finding.status:
row_class = "table-secondary"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
elif "Muted" in finding.status:
row_class = "table-secondary"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True

Copy link
Member

@sergargar sergargar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @pedrooot ! Please, see my comments.

@sergargar sergargar self-requested a review June 6, 2024 13:30
Copy link
Member

@sergargar sergargar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sergargar sergargar merged commit e6472f9 into master Jun 6, 2024
9 of 11 checks passed
@sergargar sergargar deleted the PRWLR-3876-bug-unable-to-filter-muted-findings-in-html-output-4181 branch June 6, 2024 14:06
sergargar added a commit that referenced this pull request Jun 6, 2024
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
sergargar added a commit that referenced this pull request Jun 6, 2024
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
sergargar added a commit that referenced this pull request Jun 7, 2024
Co-authored-by: Sergio Garcia <38561120+sergargar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Unable to filter muted findings in HTML output
3 participants