mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 14:21:53 +00:00

## Summary Pick up updates made in latest [releases](https://github.com/PyCQA/bandit/releases) of `bandit`: - `S311`: https://github.com/PyCQA/bandit/pull/940 and https://github.com/PyCQA/bandit/pull/1096 - `S324`: https://github.com/PyCQA/bandit/pull/1018 - `S605`: https://github.com/PyCQA/bandit/pull/1116 ## Test Plan Snapshot tests
28 lines
547 B
Python
28 lines
547 B
Python
import os
|
|
import subprocess
|
|
|
|
import commands
|
|
import popen2
|
|
|
|
# Check all shell functions.
|
|
os.system("true")
|
|
os.popen("true")
|
|
os.popen2("true")
|
|
os.popen3("true")
|
|
os.popen4("true")
|
|
popen2.popen2("true")
|
|
popen2.popen3("true")
|
|
popen2.popen4("true")
|
|
popen2.Popen3("true")
|
|
popen2.Popen4("true")
|
|
commands.getoutput("true")
|
|
commands.getstatusoutput("true")
|
|
subprocess.getoutput("true")
|
|
subprocess.getstatusoutput("true")
|
|
|
|
|
|
# Check command argument looks unsafe.
|
|
var_string = "true"
|
|
os.system(var_string)
|
|
os.system([var_string])
|
|
os.system([var_string, ""])
|