Enable some more bandit checks (#30857)

* Enable B108 (hardcoded tmp dir), address findings

* Enable B602 (subprocess popen with shell), address findings

* Enable B604 (start process with shell), address findings

* Enable B306 (mktemp), B307 (eval), and B325 (tempnam), no issues to address
This commit is contained in:
Ville Skyttä authored and GitHub committed 2020-01-20 18:44:55 +02:00
1 parent 6cf20fc7fa
commit 5e2ba2eb77
21 files changed
+110 -91

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ def x10_command(command):
def get_unit_status(code):
"""Get on/off status for given unit."""
output = check_output(f"heyu onstate {code}", shell=True)
output = check_output(["heyu", "onstate", code])
return int(output.decode("utf-8")[0])