gmantelet/python-lyth

View on GitHub
ci/bootstrap.py

Summary

Maintainability
A
0 mins
Test Coverage

subprocess call - check for execution of untrusted input.
Wontfix

    subprocess.check_call(args)
Severity: Info
Found in ci/bootstrap.py by bandit

Consider possible security implications associated with subprocess module.
Wontfix

        import subprocess

Severity: Info
Found in ci/bootstrap.py by bandit

Starting a process without a shell.
Wontfix

    os.execv(python_executable, [python_executable, __file__, "--no-env"])
Severity: Info
Found in ci/bootstrap.py by bandit

Consider possible security implications associated with subprocess module.
Wontfix

import subprocess
Severity: Info
Found in ci/bootstrap.py by bandit

subprocess call - check for execution of untrusted input.
Wontfix

        for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True).splitlines()
Severity: Info
Found in ci/bootstrap.py by bandit

By default, jinja2 sets autoescape to False. Consider using autoescape=True or use the select_autoescape function to mitigate XSS vulnerabilities.
Wontfix

    jinja = jinja2.Environment(
        loader=jinja2.FileSystemLoader(join(base_path, "ci", "templates")),
        trim_blocks=True,
        lstrip_blocks=True,
        keep_trailing_newline=True
Severity: Major
Found in ci/bootstrap.py by bandit

Function exec_in_env has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
Wontfix

def exec_in_env():
    env_path = join(base_path, ".tox", "bootstrap")
    if sys.platform == "win32":
        bin_path = join(env_path, "Scripts")
    else:
Severity: Minor
Found in ci/bootstrap.py - About 55 mins to fix

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"

Further reading

There are no issues that match your filters.

Category
Status