from typing import List
from typing import Dict


def get_bad_images(images: List[Dict], tag_whitelist: List[str]) -> List[Dict]:
    """Filter a list of images for non-whitelisted tags or no tags."""
    bad_images = []
    for image in images:
        image_tag = image.get("imageTag", "")
        image_digest = image.get("imageDigest", "")
        if not image_tag and not image_digest:
            print("Found entirely blank image")
        elif not image_tag:
            bad_images.append({"imageDigest": image_digest})
        elif image_tag not in tag_whitelist:
            bad_images.append({"imageTag": image_tag})
    return bad_images