Closed dharmit closed 6 years ago
Sample output after fix
{
"image_under_test": "172.29.33.29:5000/projectatomic/cri-o:YjQ1MWM5OWQ3NG",
"logs": {
"CVE Feed Last Updated": "NA",
"Finished Time": "2018-04-11-17-55-34-934202",
"Scan Results": {
"OS Release": "CentOS Linux 7 (Core)",
"Package Updates": []
},
"Scan Type": "Image Scan",
"Scanner": "pipeline-scanner",
"Start Time": "2018-04-11-17-55-34-697317",
"Successful": false,
"Summary": "Error occured while processing yum updates. Cannot open logfile /scanin/_52337bc0e3a9ce349f3ee0efb74b3afc201f1265ebd895a6d8fb73202180ce48/var/log/yum.log\novl: Error while doing RPMdb copy-up:\n[Errno 30] Read-only file system: '/scanin/_52337bc0e3a9ce349f3ee0efb74b3afc201f1265ebd895a6d8fb73202180ce48/var/lib/rpm/.dbenv.lock'\nCould not create lock at /scanin/_52337bc0e3a9ce349f3ee0efb74b3afc201f1265ebd895a6d8fb73202180ce48/var/run/yum.pid: [Errno 30] Read-only file system: '/scanin/_52337bc0e3a9ce349f3ee0efb74b3afc201f1265ebd895a6d8fb73202180ce48/var/run/yum.pid' \n\n\nCan't create lock file; exiting\n",
"UUID": "52337bc0e3a9ce349f3ee0efb74b3afc201f1265ebd895a6d8fb73202180ce48"
},
"msg": "No updates required.",
"scanner": "pipeline-scanner"
}
pipeline-scanner (or the yum-update scanner) doesn't show any logs when there are not RPM updates available for the container image. For example - https://registry.centos.org/pipeline-logs/ZTBkMjNhMDVkZj/pipeline_scanner_results.json
But for the same image, misc-package-updates scanner shows logs even when there are no updates available or it fails to run due to lack of binary in the image - https://registry.centos.org/pipeline-logs/ZTBkMjNhMDVkZj/misc_package_updates_scanner_results.json
Similar to misc-package-updates scanner, we should show logs in pipeline-scanner as well.