File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -1067,7 +1067,7 @@ def _ecr_login_if_needed(boto_session, image):
1067
1067
ecr_url = auth ["authorizationData" ][0 ]["proxyEndpoint" ]
1068
1068
1069
1069
cmd = "docker login -u AWS -p %s %s" % (token , ecr_url )
1070
- subprocess .check_output (cmd , shell = True )
1070
+ subprocess .check_output (cmd . split () )
1071
1071
1072
1072
return True
1073
1073
@@ -1081,5 +1081,5 @@ def _pull_image(image):
1081
1081
pull_image_command = ("docker pull %s" % image ).strip ()
1082
1082
logger .info ("docker command: %s" , pull_image_command )
1083
1083
1084
- subprocess .check_output (pull_image_command , shell = True )
1084
+ subprocess .check_output (pull_image_command . split () )
1085
1085
logger .info ("image pulled: %s" , image )
Original file line number Diff line number Diff line change @@ -765,7 +765,7 @@ def test_ecr_login_needed(check_output):
765
765
"docker login -u AWS -p %s https://520713654638.dkr.ecr.us-east-1.amazonaws.com" % token
766
766
)
767
767
768
- check_output .assert_called_with (expected_command , shell = True )
768
+ check_output .assert_called_with (expected_command . split () )
769
769
session_mock .client ("ecr" ).get_authorization_token .assert_called_with (
770
770
registryIds = ["520713654638" ]
771
771
)
@@ -781,7 +781,7 @@ def test_pull_image(check_output):
781
781
782
782
expected_command = "docker pull %s" % image
783
783
784
- check_output .assert_called_once_with (expected_command , shell = True )
784
+ check_output .assert_called_once_with (expected_command . split () )
785
785
786
786
787
787
def test__aws_credentials_with_long_lived_credentials ():
You can’t perform that action at this time.
0 commit comments