From 84db869930f48b57fbe7a1de23d17a14ceeecb67 Mon Sep 17 00:00:00 2001 From: Rohan Arora Date: Mon, 16 Jan 2017 13:33:38 -0600 Subject: [PATCH] Nosec Paramiko exec_command() warning from Bandit In an effort to clean up Bandit issues, this can be nosec'd as the command is either made from hardcoded variables or passed in from the command line by users who have access to the machine running cinder. Change-Id: I0e73d1dcac122f1e0b1b205bcdba9c8276cc9150 --- cinder/volume/drivers/reduxio/rdx_cli_api.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cinder/volume/drivers/reduxio/rdx_cli_api.py b/cinder/volume/drivers/reduxio/rdx_cli_api.py index ccc414f5dc7..d90f8bae622 100644 --- a/cinder/volume/drivers/reduxio/rdx_cli_api.py +++ b/cinder/volume/drivers/reduxio/rdx_cli_api.py @@ -175,7 +175,8 @@ class ReduxioAPI(object): for x in range(1, CONNECTION_RETRY_NUM): try: self._reconnect_if_needed() - stdin, stdout, stderr = self.ssh.exec_command( + stdin, stdout, stderr = self.ssh.exec_command( # nosec + # command input from authorized users on command line command=six.text_type(cmd), timeout=CLI_SSH_CMD_TIMEOUT) success = True break