openshift / image-inspector

Apache License 2.0
34 stars 29 forks source link

Openscap - Only parse reports when scan was successful #60

Closed enoodle closed 7 years ago

enoodle commented 7 years ago

This fixes ~two~ one minor problems that can cause image-inspector to crush

  1. If the scan fails then the results will still be sent to be parsed and this will cause a panic that will crush the software. Moved the parsing to only happen when the scan was successful.

  2. ~When given the argument is appended with the name of the expected CVE file which is not the intent of this argument.~ I remembered that for this parameter that it is expected to be a path to be appended with "com.redhat.rhsa-RHEL7.ds.xml.bz2". (7 could be replaced with the RHEL version of the scanned image). I now feel that this will be a bit less convenient when providing entirely different cve files with custom checks. I just wanted to fix small bugs here so I removed this.

ilackarms commented 7 years ago

i noticed one of these bugs; this change LGTM

simon3z commented 7 years ago

@ilackarms @enoodle can you use a more descriptive title for the PR?

mfojtik commented 7 years ago

LGTM I guess there was a return before so we don't proceed with the error happened.