def run(self):
self._logger.debug("main image analysis on images: " + str(self.images) + ": begin")
# analyze image and all of its family members
success = True
toanalyze = OrderedDict()
# calculate all images to be analyzed
for imageId in self.images:
coreimage = self.allimages[imageId]
toanalyze.update(self.selection_strategy.evaluate_familytree(coreimage.anchore_familytree, self.allimages))
# execute analyzers
self._logger.debug("images to be analyzed: " + str(toanalyze.keys()))
for imageId in toanalyze.keys():
image = toanalyze[imageId]
success = self.run_analyzers(image)
if not success:
self._logger.error("analyzer failed to run on image " + str(image.meta['imagename']) + ", skipping the rest")
break
if not success:
self._logger.error("analyzers failed to run on one or more images.")
return (False)
#if not self.skipgates:
# # execute gates
# self._logger.debug("running gates post-analysis: begin")
# for imageId in toanalyze.keys():
# c = controller.Controller(anchore_config=self.config, imagelist=[imageId], allimages=self.allimages).run_gates(refresh=True)
# self._logger.debug("running gates post-analysis: end")
self._logger.debug("main image analysis on images: " + str(self.images) + ": end")
return (success)
评论列表
文章目录