From b6d47d1d461cdeba781ba5b3d55daaa9c381b2dd Mon Sep 17 00:00:00 2001 From: Mike Brancato Date: Sat, 2 Nov 2024 12:16:46 -0400 Subject: [PATCH] Fix multiple tags for an image --- utils/oscap_docker_python/oscap_docker_util.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/utils/oscap_docker_python/oscap_docker_util.py b/utils/oscap_docker_python/oscap_docker_util.py index 0e1dc1dcb6..3fbd0c86ca 100644 --- a/utils/oscap_docker_python/oscap_docker_util.py +++ b/utils/oscap_docker_python/oscap_docker_util.py @@ -59,6 +59,10 @@ def __init__(self, target, is_image=False, oscap_binary='oscap'): if self.is_image: self.image_name, self.config = self._get_image_name_and_config(target) + if "," in self.image_name: + # Fix when a single image has multiple tags + self.image_name = self.image_name.split(",")[0] + if self.image_name: print("Creating a temporary container for the image...")