Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1450249 - [RFE] Out of the box OpenSCAP Images Report
[RFE] Out of the box OpenSCAP Images Report
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.7.0
Unspecified Unspecified
unspecified Severity unspecified
: GA
: 5.9.0
Assigned To: Gregg Tanzillo
Gilad Shefer
container:report
: FutureFeature, RFE
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-05-11 21:00 EDT by tachoi
Modified: 2018-06-06 07:55 EDT (History)
10 users (show)

See Also:
Fixed In Version: 5.9.0.1
Doc Type: Enhancement
Doc Text:
Feature: Giving an explanation for openscap report field Reason: some fields are having very similar name, customer wants to know the difference Result:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-03-01 08:12:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0380 normal SHIPPED_LIVE Moderate: Red Hat CloudForms security, bug fix, and enhancement update 2018-03-01 13:37:12 EST

  None (edit)
Description tachoi 2017-05-11 21:00:55 EDT
Description of problem:
- CFME 5.7.1.3
- There are two different openscap results fields in the reports
=> Reports =>  New report => Base the report on "Container Images"
Openscap rule Results: Name|Result|Severity 
Openscap Result.Openscap Rule Results: Name|Result|Severity 

=> No explanation can be found on Red Hat documentation
- If you create a report with "Openscap Rule Results: Name|Result|Severity" the report won't finish running
- However, "Openscap rule Results: Name|Result|Severity "setup report works fine.

Version-Release number of selected component (if applicable):
CFME 5.7.1.3

How reproducible:
1. Reports =>  New report => Base the report on "Container Images"
2. Select field "Openscap Rule Results: Name|Result|Severity" the report
3. Run report

Steps to Reproduce:
1. Reports =>  New report => Base the report on "Container Images"
2. Select field "Openscap Rule Results: Name|Result|Severity" the report
3. Run report

Actual results:
Report is not finished or returned error, just staying running status

Expected results:
1. Finishing in reasonable timeframe
2. Document explanation for the difference

Additional info:
Comment 5 tachoi 2017-05-12 00:56:03 EDT
It is also reported that completed report("Openscap rule Results: Name|Result|Severity ") also has a problem in its data.

It's only returning a small subset of the data. 

ex) One openscap result is 443 items for pass and failed. 
However, if we generate 'working' report ("Openscap rule Results: Name|Result|Severity "), we can only see 3 items from it.

Also if we set a filter to only show failed rule results, it shows nothing because it's showing no failed results. (even though there are failed results in almost all of the openscap reports that are finished already)
Comment 7 tachoi 2017-05-12 01:04:01 EDT
Correction in problem description

- However, "Openscap rule Results: Name|Result|Severity "setup report works fine.

+ However, "Openscap Result.Openscap Rule Results: Name|Result|Severity" setup report works fine.

Regards,
Taeho
Comment 11 Federico Simoncelli 2017-05-12 11:35:06 EDT
Indeed I can see these different fields in the report:

Openscap Rule Results : Name
Openscap Rule Results : Result
Openscap Rule Results : Severity
Openscap Result.Openscap Rule Results : Name
Openscap Result.Openscap Rule Results : Result
Openscap Result.Openscap Rule Results : Severity

Mooli is there any difference? Should we hide any?
Assigning this to Zahi in case we need to fix something.
Comment 12 Mooli Tayer 2017-05-14 06:24:11 EDT
Container images have OpenSCAP rule results associated in two ways that should be virtually identical:

- container images have an openscap result and those have openscap rule results
- container images have openscap rule results through openscap result [1]

I'm not sure why ContainerImage.OpenscapRuleResults isn't behaving as expected

Keenan, should a has has many through relationship work in reports? are both tables needed in miq_expression.yml?
(Can you point us to where report results are being calculated? I could not find that

Thanks

[1] https://github.com/manageiq/manageiq/blob/3a37928b285917325d8b08bc4db3e14470e19687/app/models/container_image.rb#L23-L24
Comment 13 Mooli Tayer 2017-05-14 06:25:18 EDT
I wonder what happens if we remove openscap_rule_results OR openscap_result from miq_expression.yml[2].

The user does not really care about the openscap result, he just cares that openscap_rule_results association is what is expected (all results from the last scan)


See also: 
```
relats = MiqExpression.build_relats(:ContainerImage)
relats[:reflections][:openscap_result]
relats[:reflections][:openscap_rule_results]
``` 

[2] https://github.com/moolitayer/manageiq/blob/7cf0ef1c2b0f5c153142be8ef454b8aa57971ab7/config/miq_expression.yml
Comment 14 tachoi 2017-05-16 23:29:04 EDT
Hi Team

Thanks for support on this issue.
Do you have any update on this?
Any update would be much appreciated !

Regards,
Taeho
Comment 15 Federico Simoncelli 2017-05-17 04:11:37 EDT
(In reply to Mooli Tayer from comment #13)
> I wonder what happens if we remove openscap_rule_results OR openscap_result
> from miq_expression.yml[2].
> 
> The user does not really care about the openscap result, he just cares that
> openscap_rule_results association is what is expected (all results from the
> last scan)

Actually  I don't know if that's the case.

Tae, it is not clear what is the optimal report that the customer would like to produce (this may result in an RFE if ATM we can't produce the report they want).

Are they looking for a per-image result:

Image Name | OpenSCAP Result
--
image1 | pass
image2 | fail
image3 | pass
...

Or per-image per-rule result:

Image Name | OpenSCAP Rule | Result
--
image1 | rule1 | pass
image1 | rule2 | fail
image2 | rule1 | pass
image2 | rule2 | pass
...


The latter it is not only extremely verbose (for each image you have hundreds of lines) but also hard to produce, read and understand.


Tae, please let us know what would be the optimal report they'd like to produce (personally I think the foremost: per-image).
Comment 16 tachoi 2017-05-21 18:46:53 EDT
Sorry for late reply
Here is the feedback from customer.

"I would be happy with either option working what ever doesn't need an RFE. Ideally we would be able to report on both scenarios."

Please let me know if you need any further info.

Regards,
Taeho
Comment 17 Federico Simoncelli 2017-05-22 03:48:36 EDT
What we could try to do (usable enough without an RFE but with some stabilization work) is a per-image per-rule report filtering/showing only the failed rules:

Image Name | OpenSCAP Rule | Result
--
image1 | rule2 | fail
image2 | rule1 | fail
image2 | rule2 | fail
image7 | rule4 | fail
...

Zahi can you check if this works and maybe send an OOTB report?
Once that's finalized we'll see if it still has problem on the customer side.
Comment 20 zakiva 2017-05-24 10:00:44 EDT
Taeho, can you please take a look in https://github.com/ManageIQ/manageiq/pull/15210 I added a screenshot of the new report there. I included the severity column too, if you think it should be removed please let me know. Also, please let me know if anything else should be done in order the resolve this issue, thanks.
Comment 34 errata-xmlrpc 2018-03-01 08:12:35 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0380

Note You need to log in before you can comment on or make changes to this bug.