ci/bootstrap.py
subprocess call - check for execution of untrusted input. Wontfix
Wontfix
subprocess.check_call(args)
- Exclude checks
Consider possible security implications associated with subprocess module. Wontfix
Wontfix
import subprocess
- Exclude checks
Starting a process without a shell. Wontfix
Wontfix
os.execv(python_executable, [python_executable, __file__, "--no-env"])
- Exclude checks
Consider possible security implications associated with subprocess module. Wontfix
Wontfix
import subprocess
- Exclude checks
subprocess call - check for execution of untrusted input. Wontfix
Wontfix
for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True).splitlines()
- Exclude checks
By default, jinja2 sets autoescape to False. Consider using autoescape=True or use the select_autoescape function to mitigate XSS vulnerabilities. Wontfix
Wontfix
jinja = jinja2.Environment(
loader=jinja2.FileSystemLoader(join(base_path, "ci", "templates")),
trim_blocks=True,
lstrip_blocks=True,
keep_trailing_newline=True
- Exclude checks
Function exec_in_env
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Wontfix
Wontfix
def exec_in_env():
env_path = join(base_path, ".tox", "bootstrap")
if sys.platform == "win32":
bin_path = join(env_path, "Scripts")
else:
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"