Files
deb-bandit/examples/multiline_statement.py
Travis McPeak 66d5a1c264 Making the /tmp file test more accurate
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
2015-10-07 15:51:28 +02:00

7 lines
177 B
Python

import subprocess
subprocess.check_output("/some_command",
"args",
shell=True,
universal_newlines=True)