Advertisement
Guest User

Untitled

a guest
Jun 26th, 2014
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. def sec_shell_eq_true(logical_line):
  2. # ignore spaces in the line, to find shell = True, shell =True, etc
  3. line_spaces_removed = logical_line.replace(' ', '')
  4. if 'shell=True' in line_spaces_removed and 'subprocess' in line_spaces_removed:
  5. yield(0, "Security risk: use of shell=True in subprocess call.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement