def scan_list(self, scan_list, number, onlycache=2):
     """onlycache -
         0 to enable CVE fetch
         1 to disable CVE fetch
         2 to use defaults from oscapd config file
     """
     worker = Worker(scan=scan_list, number=number,
                     onlycache=self._parse_only_cache(self.system.config, int(onlycache)),
                     fetch_cve_url=self.system.config.fetch_cve_url)
     return_json = worker.start_application()
     return json.dumps(return_json)
 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)
    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!
        """
        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)
 def scan_containers(self, onlyactive, allcontainers, 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(onlyactive=onlyactive,
                     allcontainers=allcontainers,
                     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 #5
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)
Exemple #6
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)
 def scan_list(self, scan_list, number):
     worker = Worker(scan=scan_list, number=number)
     return_json = worker.start_application()
     return json.dumps(return_json)
 def scan_images(self, allimages, images, number):
     worker = Worker(allimages=allimages, images=images, number=number)
     return_json = worker.start_application()
     return json.dumps(return_json)
 def scan_containers(self, onlyactive, allcontainers, number):
     worker = Worker(onlyactive=onlyactive, allcontainers=allcontainers,
                     number=number)
     return_json = worker.start_application()
     return json.dumps(return_json)