diff --git a/.github/containerscan/allowedlist.yaml b/.github/containerscan/allowedlist.yaml index cae66aa..62e0ba1 100644 --- a/.github/containerscan/allowedlist.yaml +++ b/.github/containerscan/allowedlist.yaml @@ -1,5 +1,6 @@ general: vulnerabilities: + - CVE-2023-3640 - CVE-2023-31248 - CVE-2023-29007 - CVE-2023-25652 diff --git a/pyproject.toml b/pyproject.toml index 4f2a6ad..1dcaec7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pht-train-container-library" -version = "2.0.6" +version = "2.0.6a0" description = "Python library for handling containerized PHT trains" authors = ["Michael Graf "] readme = "README.md" diff --git a/train_lib/docker_util/validate_master_image.py b/train_lib/docker_util/validate_master_image.py index e6878b1..368211d 100644 --- a/train_lib/docker_util/validate_master_image.py +++ b/train_lib/docker_util/validate_master_image.py @@ -1,5 +1,4 @@ import hashlib -import multiprocessing as mp import tarfile from io import BytesIO @@ -127,17 +126,21 @@ def _get_file_hashes( bytes_arr.extend(layer_file.read()) layer_tars.append((bytes_arr, path_exceptions)) - # init and execute (a)synchronous multiprocessing for hashing function - pool = mp.Pool(num_cpus) if num_cpus != -1 else mp.Pool(mp.cpu_count()) - # results = [] - # def collect_result(result): - # global results - # results.append(result) - # pool.map_async(_apply_hash_function_to_layers, layers, callback=collect_result) - results = pool.map(_apply_hash_function_to_layers, layer_tars) - pool.close() + # # init and execute (a)synchronous multiprocessing for hashing function #TODO + # pool = mp.Pool(num_cpus) if num_cpus != -1 else mp.Pool(mp.cpu_count()) + # # results = [] + # # def collect_result(result): + # # global results + # # results.append(result) + # # pool.map_async(_apply_hash_function_to_layers, layers, callback=collect_result) + # results = pool.map(_apply_hash_function_to_layers, layer_tars) + # pool.close() # pool.join() + results = [ + _apply_hash_function_to_layers(layer_tar) for layer_tar in layer_tars + ] + # aggregate multiprocessing results for result in results: # integrate hash results into full image hash