def temppath():
    path = tempfile.mktemp()
    try:
        yield path
    finally:
        if os.path.exists(path):
            if os.path.isfile(path):
                os.remove(path)
            else:
                shutil.rmtree(path)
The product exposes a resource to the wrong control sphere, providing unintended actors with inappropriate access to the resource.