def list_available_antivirus(json=False): result = scanner.list_available_antivirus( get_docker_configuration(DOCKER_CONFIG_PATH)) if json: print(result) else: print_av_list(result)
def update_antivirus(json=False): result = loop.run_until_complete( scanner.update_antivirus_async( get_docker_configuration(DOCKER_CONFIG_PATH))) if json: print(result) else: print_update(result)
def pull_dockers(json=False): result = loop.run_until_complete( scanner.pull_dockers_async( get_docker_configuration(DOCKER_CONFIG_PATH))) if json: print(result) else: print_pull_dockers(result)
def scan_file(file, json=False): detections = scanner.scan_file_parse_results( loop.run_until_complete( scanner.scan_file_async( file, get_docker_configuration(DOCKER_CONFIG_PATH)))) if json: response = {} response['detections'] = detections print(response) else: print_detections(detections)
async def scan_file(file_path, config): scan_result = await scanner.scan_file_async( file_path, get_docker_configuration(config)) return scanner.scan_file_parse_results(scan_result)