Erdnaxela3/bioptim_gui

View on GitHub

Showing 105 of 105 total issues

Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
Open

        o = pkl.load(f)
Severity: Minor
Found in gui/animate.py by bandit

TODO found
Open

    // TODO Better fail if not ready (popup?)
Severity: Minor
Found in gui/lib/models/python_interface.dart by fixme

Consider possible security implications associated with pickle module.
Open

import pickle as pkl

Severity: Info
Found in gui/animate.py by bandit

Consider possible security implications associated with pickle module.
Open

import pickle as pkl
Severity: Info
Found in gui/graph_multiple_sols.py by bandit

TODO found
Open

    # TODO fill this section

TODO found
Open

    # TODO all interpolations types are not implemented yet,

TODO found
Open

  // TODO
Severity: Minor
Found in gui/lib/screens/generate_model.dart by fixme

TODO found
Open

# TODO: Move the rest of this into files in ephemeral. See
Severity: Minor
Found in gui/windows/flutter/CMakeLists.txt by fixme

TODO found
Open

              // TODO Manage when there is more than 3 columns (scrolling?)

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert self.penalty_type == "CUSTOM", "This function should only be called for custom penalty"

TODO found
Open

            // onSelected: (value) Alexandre: TODO implement this in the backend,

TODO found
Open

              // TODO GridView does not work well for unknown nbCol... This should be done using an actual for loop

Consider possible security implications associated with pickle module.
Open

import pickle as pkl

Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
Open

            o = pkl.load(f)
Severity: Minor
Found in gui/graph_multiple_sols.py by bandit

TODO found
Open

                // ), // TODO implement chooser to edit generic ocp bounds

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert function_name is not None, "The function argument is missing"

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert len(pkl_paths) != 0

Severity: Info
Found in gui/graph_multiple_sols.py by bandit

Pickle and modules that wrap it can be unsafe when used to deserialize untrusted data, possible security issue.
Open

        o = pkl.load(f)
Severity: Minor
Found in gui/graph_multiple_sols.py by bandit

TODO found
Open

    # TODO all constraints types are not implemented yet,

Either merge this branch with the identical one on line "294" or change one of the implementations.
Open

                x_bounds[-1]["min"][cls.Zrot, 1] = np.pi * half_twist_till_now - 0.2
                x_bounds[-1]["max"][cls.Zrot, 1] = np.pi * sum(half_twists[: i + 1]) + 0.2
                x_bounds[-1]["min"][cls.Zrot, 2] = np.pi * sum(half_twists[: i + 1]) - 0.2 - np.pi / 4
                x_bounds[-1]["max"][cls.Zrot, 2] = np.pi * sum(half_twists[: i + 1]) + 0.2

Having two branches in the same if structure with the same implementation is at best duplicate code, and at worst a coding error. If the same logic is truly needed for both instances, then they should be combined.

Noncompliant Code Example

if 0 <= a < 10:
    do_the_thing()
elif 10 <= a < 20:
    do_the_other_thing()
elif 20 <= a < 50:
    do_the_thing()  # Noncompliant; duplicates first condition
else:
    do_the_rest()

b = 4 if a > 12 else 4

Compliant Solution

if (0 <= a < 10) or (20 <= a < 50):
    do_the_thing()
elif 10 <= a < 20:
    do_the_other_thing()
else:
    do_the_rest()

b = 4

or

if 0 <= a < 10:
    do_the_thing()
elif 10 <= a < 20:
    do_the_other_thing()
elif 20 <= a < 50:
    do_the_third_thing()
else:
    do_the_rest()

b = 8 if a > 12 else 4
Severity
Category
Status
Source
Language