Remove twistcli after running
@@ -2,6 +2,7 @@ import logging
import subprocess # nosec
import docker
import json
+import os
from checkov.common.bridgecrew.image_scanning.docker_image_scanning_integration import docker_image_scanning_integration
@@ -45,6 +46,8 @@ class ImageScanner:
scan_result = json.load(docker_image_scan_result_file)
docker_image_scanning_integration.report_results(docker_image_name, dockerfile_path, dockerfile_content, twistcli_scan_result=scan_result)
+
+ os.remove(TWISTCLI_FILE_NAME)
except Exception as e:
logging.error(f"Failed to scan docker image\n{e}")
raise e
