Description of problem: When performing a OpenSCAP evaluation the target machine shown is the pod name that perform scan rather than the image it is scanning. For example if the pod name which performs the scan was called inspector-1 and it scans container image called my-rhel-image. Then instead of showing my-rhel-image the target machine shows inspector-1. Version-Release number of selected component (if applicable): All How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Scan showing the pod name Expected results: Scan showing the image name Additional info: Ian Watson created a workaround: In /var/www/miq/vmdb/app/models/manageiq/providers/kubernetes/container_manager/scanning/job.rb in the SmartState appliance add the following line in at position 380 - :hostname => options[:image_full_name].match(/(.*)\/(.*)@(.*)/i).captures[1], This sets the target machine host name. In /opt/rh/cfme-gemset/bundler/gems/manageiq-ui-classic-1048ffdbd63f/app/controllers/container_image_controller.rb of the UI appliance amend the send data line to send_data(@record.openscap_result.html, :filename => @record.openscap_result.container_image.full_name.match(/(.*)@(.*)/i).captures[0].concat(".html"))
I don't think this is an appliance issue. It seems like a provider issue and I think it most likely belongs to the OCP providers team. I believe they did the OpenSCAP work
I'm not sure what you mean by "performing a OpenSCAP evaluation" - can you describe what screen you are using to issue the scan?
Hi The responsible team is whoever maintains the manageiq-kubernetes provider plugin - https://github.com/ManageIQ/manageiq-providers-kubernetes That is where the code which is in question resides. Steps for reproduction: 1. From Cloudforms click Containers -> Container Images. 2. Click on any image 3. Click Perform Smart State Analysis 4. Wait until its finished 5. Click OpenSCAP HTML Report 6. Puff out comes a report called report.html 7. Open the report and inspect the target hostname. Let me know if you need any further clarity Cheers Ian
https://github.com/ManageIQ/manageiq-providers-kubernetes/pull/248 https://github.com/ManageIQ/manageiq-ui-classic/pull/3758
Created attachment 1457270 [details] OpenSCAP Evaluation Report Verified on 5.10.0.3.20180705151325_ce4d2b5 On OpenSCAP Evaluation Report the Evaluation target = Scaned Image name