Check that twistcli exit code == 0
@@ -39,7 +39,7 @@ class ImageScanner:
docker_image_scanning_integration.download_twistcli(TWISTCLI_FILE_NAME)
command_args = f"./{TWISTCLI_FILE_NAME} images scan --address {docker_image_scanning_integration.get_proxy_address()} --token {docker_image_scanning_integration.get_bc_api_key()} --details --output-file {DOCKER_IMAGE_SCAN_RESULT_FILE_NAME} {docker_image_id}".split()
- subprocess.run(command_args) # nosec
+ subprocess.run(command_args, check=True) # nosec
logging.info(f'TwistCLI ran successfully on image {docker_image_id}')
with open(DOCKER_IMAGE_SCAN_RESULT_FILE_NAME) as docker_image_scan_result_file:
