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:
parent
6cf20fc7fa
commit
5e2ba2eb77
21 changed files with 110 additions and 91 deletions
|
@ -33,7 +33,10 @@ class CommandLineNotificationService(BaseNotificationService):
|
|||
"""Send a message to a command line."""
|
||||
try:
|
||||
proc = subprocess.Popen(
|
||||
self.command, universal_newlines=True, stdin=subprocess.PIPE, shell=True
|
||||
self.command,
|
||||
universal_newlines=True,
|
||||
stdin=subprocess.PIPE,
|
||||
shell=True, # nosec # shell by design
|
||||
)
|
||||
proc.communicate(input=message)
|
||||
if proc.returncode != 0:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue