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

Add Report: Images by Failed Openscap Rule Results #15210

Merged
merged 1 commit into from
May 31, 2017

Conversation

zakiva
Copy link
Contributor

@zakiva zakiva commented May 24, 2017

BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1450249

openscaps

@miq-bot add_label providers/containers, bug, reporting

cc @simon3z @moolitayer

exp:
CONTAINS:
field: ContainerImage.openscap_result.openscap_rule_results-result
value: fail

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

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

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)

Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

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

@zakiva same here: OpenSCAP

@simon3z
Copy link
Contributor

simon3z commented May 26, 2017

@zakiva I don't know what is wrong here but it's not working for me. This is the output:

screenshot from 2017-05-26 11-29-08

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
Copy link
Contributor

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

Copy link
Contributor Author

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.

@zakiva
Copy link
Contributor Author

zakiva commented May 28, 2017

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.

@simon3z Yeah, it is weird, I'll look into it.

Update: I think the filter was wrong, pushing a new one.

@miq-bot
Copy link
Member

miq-bot commented May 28, 2017

Checked commit zakiva@79db9a1 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0
1 file checked, 0 offenses detected
Everything looks fine. 👍

@zakiva
Copy link
Contributor Author

zakiva commented May 28, 2017

@simon3z @moolitayer PTAL

@simon3z
Copy link
Contributor

simon3z commented May 30, 2017

@simon3z @moolitayer PTAL

@zakiva nice. Works for me now.

@chessbyte chessbyte self-assigned this May 31, 2017
@chessbyte chessbyte merged commit f126dce into ManageIQ:master May 31, 2017
@chessbyte chessbyte added this to the Sprint 62 Ending Jun 5, 2017 milestone May 31, 2017
@chessbyte chessbyte added enhancement and removed bug labels May 31, 2017
@simon3z
Copy link
Contributor

simon3z commented May 31, 2017

@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?
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants