The previous tmp file check would check for /tmp anywhere in the string. This would lead to false positives by finding things like: my_directory/tmp, which should be ok if my_directory is protected. This commit changes the test to only look for strings which start with /tmp. We'll also remove the multi-line string stuff because without /tmp we no longer have a way to test. We don't have any plugins left that check for strings in the middle of multiline strings. To maintain coverage we'll add an example with a multiline statement and change the testing to use that. Change-Id: If30da3db93768bc9a6b1c909924204c30f28efad
7 lines
177 B
Python
7 lines
177 B
Python
import subprocess
|
|
|
|
subprocess.check_output("/some_command",
|
|
"args",
|
|
shell=True,
|
|
universal_newlines=True)
|