#NEWLINE# def check_file_for_aws_keys( filenames , keys ) : #NEWLINE# #INDENT# bad_files = [ ] #NEWLINE# for filename in filenames : #NEWLINE# #INDENT# with open ( filename , 'r' ) as content : #NEWLINE# #INDENT# text_body = content . read ( ) #NEWLINE# if any ( ( ( key in text_body ) for key in keys ) ) : #NEWLINE# #INDENT# bad_files . append ( filename ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return bad_files