@@ -2843,11 +2843,12 @@ def take_action(self, parsed_args):
28432843 # there are infra failures
28442844 if parsed_args .name_lookup_one_by_one or image_id :
28452845 for image_id in image_ids :
2846- # "Image Name" is not crucial, so we swallow any exceptions
28472846 try :
28482847 images [image_id ] = image_client .get_image (image_id )
28492848 except Exception :
2850- pass
2849+ # retrieving image names is not crucial, so we swallow
2850+ # any exceptions
2851+ pass # nosec: B110
28512852 else :
28522853 try :
28532854 # some deployments can have *loads* of images so we only
@@ -2866,7 +2867,9 @@ def take_action(self, parsed_args):
28662867 for i in images_list :
28672868 images [i .id ] = i
28682869 except Exception :
2869- pass
2870+ # retrieving image names is not crucial, so we swallow any
2871+ # exceptions
2872+ pass # nosec: B110
28702873
28712874 # create a dict that maps flavor_id to flavor object, which is used
28722875 # to display the "Flavor Name" column. Note that 'flavor.id' is not
@@ -2878,21 +2881,23 @@ def take_action(self, parsed_args):
28782881 for s in data
28792882 if s .flavor and s .flavor .get ('id' )
28802883 ):
2881- # "Flavor Name" is not crucial, so we swallow any
2882- # exceptions
28832884 try :
28842885 flavors [f_id ] = compute_client .find_flavor (
28852886 f_id , ignore_missing = False
28862887 )
28872888 except Exception :
2888- pass
2889+ # retrieving flavor names is not crucial, so we swallow
2890+ # any exceptions
2891+ pass # nosec: B110
28892892 else :
28902893 try :
28912894 flavors_list = compute_client .flavors (is_public = None )
28922895 for i in flavors_list :
28932896 flavors [i .id ] = i
28942897 except Exception :
2895- pass
2898+ # retrieving flavor names is not crucial, so we swallow any
2899+ # exceptions
2900+ pass # nosec: B110
28962901
28972902 # Populate image_name, image_id, flavor_name and flavor_id attributes
28982903 # of server objects so that we can display those columns.
@@ -4805,7 +4810,9 @@ def take_action(self, parsed_args):
48054810
48064811 cmd = ' ' .join (['ssh' , ip_address ] + args )
48074812 LOG .debug ("ssh command: {cmd}" .format (cmd = cmd ))
4808- os .system (cmd )
4813+ # we intentionally pass through user-provided arguments and run this in
4814+ # the user's shell
4815+ os .system (cmd ) # nosec: B605
48094816
48104817
48114818class StartServer (command .Command ):
0 commit comments