Exemple #1
0
 def CVEScanListAsync(self, scan_list, number, fetch_cve):
     worker = Worker(
         scan=scan_list, number=number,
         fetch_cve=self._parse_only_cache(self.system.config, int(fetch_cve)),
         fetch_cve_url=self.system.config.fetch_cve_url
     )
     return self.system.evaluate_cve_scanner_worker_async(worker)
Exemple #2
0
 def scan_images(self, allimages, images, number, fetch_cve=2):
     """fetch_cve -
         0 to enable CVE fetch
         1 to disable CVE fetch
         2 to use defaults from oscapd config file
     """
     worker = Worker(allimages=allimages, images=images,
                     number=number,
                     fetch_cve=self._parse_only_cache(self.system.config, int(fetch_cve)),
                     fetch_cve_url=self.system.config.fetch_cve_url)
     return_json = worker.start_application()
     return json.dumps(return_json)
Exemple #3
0
    def scan_list(self, scan_list, number, fetch_cve=2):
        """fetch_cve -
            0 to enable CVE fetch
            1 to disable CVE fetch
            2 to use defaults from oscapd config file

        Used by `atomic scan`. Do not break this interface!

        Deprecated, please use CVEScanListAsync
        """
        worker = Worker(scan=scan_list, number=number,
                        fetch_cve=self._parse_only_cache(self.system.config, int(fetch_cve)),
                        fetch_cve_url=self.system.config.fetch_cve_url)
        return_json = worker.start_application()
        return json.dumps(return_json)