diff --git a/tools/interop_matrix/create_matrix_images.py b/tools/interop_matrix/create_matrix_images.py index 6d86540567f..dcf96c6cccc 100755 --- a/tools/interop_matrix/create_matrix_images.py +++ b/tools/interop_matrix/create_matrix_images.py @@ -409,7 +409,12 @@ for lang in languages: jobset.message("START", "Uploading %s" % image, do_newline=True) # docker image name must be in the format /: assert image.startswith(args.gcr_path) and image.find(":") != -1 + # Add a tag to exclude the image from the GCP Vulnerability Scanner. + (image_name, tag_name) = image.rsplit(":", 1) + alternate_image_name = f"{image_name}:infrastructure-public-image-{tag_name}" + subprocess.call(["docker", "image" "tag", image, alternate_image_name]) subprocess.call(["gcloud", "docker", "--", "push", image]) + subprocess.call(["gcloud", "docker", "--", "push", alternate_image_name]) else: # Uploading (and overwriting images) by default can easily break things. print(