import json


def read_images_file(filename):
    """Read an images json file from disk.

    The Twistlock API has a /images call that returns all image scan reports.
    In the case that the user has saved this to a file, this function will
    read that file.

    :return: A dict as return by json.read()
    :exception: FileNotFoundError
    :exception: json.JSONDecodeError
    """
    with open(filename, 'r') as f:
        return json.load(f)