-
Notifications
You must be signed in to change notification settings - Fork 898
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
Add Report: Images by Failed Openscap Rule Results #15210
Conversation
exp: | ||
CONTAINS: | ||
field: ContainerImage.openscap_result.openscap_rule_results-result | ||
value: fail |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably should check != success, since there are other possible results and they all effectively mean failure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then it makes sense to show that column
order: Ascending | ||
sortby: | ||
- name | ||
- openscap_result.openscap_rule_results.severity |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the severity sorting is alphanumeric?
better drop it since it does not make sense
(It would be nice to sort by severity, even as first key, but I don't know if that is possible)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is alphanumeric, just thought it would still be nicer to see it sorted. Anyway, I changed it to be sorted by the rule name instead.
@@ -0,0 +1,64 @@ | |||
--- | |||
title: Images by Failed Openscap Rule Results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zakiva please use correct case for the name: OpenSCAP
:queue_timeout: | ||
miq_group_id: 1 | ||
user_id: 1 | ||
menu_name: Images by Failed Openscap Rule Results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zakiva same here: OpenSCAP
@zakiva I don't know what is wrong here but it's not working for me. This is the output: Which as you see is returning some of the rules that passed. The weird thing is that these are just a subset of the rules that passed, and anyway they didn't fail. |
conditions: !ruby/object:MiqExpression | ||
exp: | ||
CONTAINS: | ||
field: ContainerImage.openscap_result.openscap_rule_results-result |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work? MiqExpression should raise an error on parsing this field
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems to be working in general, I didn't get an error. However, I still removed it because this filter is wrong for this report.
@simon3z Yeah, it is weird, I'll look into it. Update: I think the filter was wrong, pushing a new one. |
Checked commit zakiva@79db9a1 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@simon3z @moolitayer PTAL |
@zakiva nice. Works for me now. |
@moolitayer even if @chessbyte already merged this can we do a more formal patch review (other than just my "works for me") to check if we may need to change/improve something? |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1450249
@miq-bot add_label providers/containers, bug, reporting
cc @simon3z @moolitayer