The following issues were found

selfdrive/car/honda/interface.py
2 issues
No name 'car' in module 'cereal'
Error

Line: 2 Column: 1

              #!/usr/bin/env python3
from cereal import car
from panda import Panda
from common.numpy_fast import interp
from common.params import Params
from selfdrive.config import Conversions as CV
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, CAR, HONDA_BOSCH, HONDA_BOSCH_ALT_BRAKE_SIGNAL
from selfdrive.car.honda.hondacan import disable_radar
from selfdrive.car import STD_CARGO_KG, CivicParams, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint

            

Reported by Pylint.

No name 'Panda' in module 'panda'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from cereal import car
from panda import Panda
from common.numpy_fast import interp
from common.params import Params
from selfdrive.config import Conversions as CV
from selfdrive.car.honda.values import CarControllerParams, CruiseButtons, CAR, HONDA_BOSCH, HONDA_BOSCH_ALT_BRAKE_SIGNAL
from selfdrive.car.honda.hondacan import disable_radar
from selfdrive.car import STD_CARGO_KG, CivicParams, scale_rot_inertia, scale_tire_stiffness, gen_empty_fingerprint

            

Reported by Pylint.

selfdrive/athena/tests/test_registration.py
2 issues
The pyCrypto library and its module RSA are no longer actively maintained and have been deprecated. Consider using pyca/cryptography library.
Security blacklist

Line: 6
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b413-import-pycrypto

              import os
import tempfile
import unittest
from Crypto.PublicKey import RSA
from pathlib import Path
from unittest import mock

from common.params import Params
from selfdrive.athena.registration import register, UNREGISTERED_DONGLE_ID

            

Reported by Bandit.

Unable to import 'Crypto.PublicKey'
Error

Line: 6 Column: 1

              import os
import tempfile
import unittest
from Crypto.PublicKey import RSA
from pathlib import Path
from unittest import mock

from common.params import Params
from selfdrive.athena.registration import register, UNREGISTERED_DONGLE_ID

            

Reported by Pylint.

selfdrive/debug/internal/qlog_size.py
2 issues
No name 'services' in module 'cereal'
Error

Line: 8 Column: 1

              
import matplotlib.pyplot as plt

from cereal.services import service_list
from tools.lib.logreader import LogReader
from tools.lib.route import Route

MIN_SIZE = 0.5  # Percent size of total to show as separate entry


            

Reported by Pylint.

Unable to import 'cereal.services'
Error

Line: 8 Column: 1

              
import matplotlib.pyplot as plt

from cereal.services import service_list
from tools.lib.logreader import LogReader
from tools.lib.route import Route

MIN_SIZE = 0.5  # Percent size of total to show as separate entry


            

Reported by Pylint.

selfdrive/car/subaru/carcontroller.py
2 issues
No name 'can' in module 'opendbc'
Error

Line: 4 Column: 1

              from selfdrive.car import apply_std_steer_torque_limits
from selfdrive.car.subaru import subarucan
from selfdrive.car.subaru.values import DBC, PREGLOBAL_CARS, CarControllerParams
from opendbc.can.packer import CANPacker


class CarController():
  def __init__(self, dbc_name, CP, VM):
    self.apply_steer_last = 0

            

Reported by Pylint.

Unable to import 'opendbc.can.packer'
Error

Line: 4 Column: 1

              from selfdrive.car import apply_std_steer_torque_limits
from selfdrive.car.subaru import subarucan
from selfdrive.car.subaru.values import DBC, PREGLOBAL_CARS, CarControllerParams
from opendbc.can.packer import CANPacker


class CarController():
  def __init__(self, dbc_name, CP, VM):
    self.apply_steer_last = 0

            

Reported by Pylint.

common/spinner.py
2 issues
Consider possible security implications associated with subprocess module.
Security blacklist

Line: 2
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess

              import os
import subprocess
from common.basedir import BASEDIR


class Spinner():
  def __init__(self):
    try:
      self.spinner_proc = subprocess.Popen(["./spinner"],

            

Reported by Bandit.

subprocess call - check for execution of untrusted input.
Security injection

Line: 9
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b603_subprocess_without_shell_equals_true.html

              class Spinner():
  def __init__(self):
    try:
      self.spinner_proc = subprocess.Popen(["./spinner"],
                                           stdin=subprocess.PIPE,
                                           cwd=os.path.join(BASEDIR, "selfdrive", "ui"),
                                           close_fds=True)
    except OSError:
      self.spinner_proc = None

            

Reported by Bandit.

common/text_window.py
2 issues
Consider possible security implications associated with subprocess module.
Security blacklist

Line: 4
Suggestion: https://bandit.readthedocs.io/en/latest/blacklists/blacklist_imports.html#b404-import-subprocess

              #!/usr/bin/env python3
import os
import time
import subprocess
from common.basedir import BASEDIR


class TextWindow:
  def __init__(self, text):

            

Reported by Bandit.

subprocess call - check for execution of untrusted input.
Security injection

Line: 11
Suggestion: https://bandit.readthedocs.io/en/latest/plugins/b603_subprocess_without_shell_equals_true.html

              class TextWindow:
  def __init__(self, text):
    try:
      self.text_proc = subprocess.Popen(["./text", text],
                                        stdin=subprocess.PIPE,
                                        cwd=os.path.join(BASEDIR, "selfdrive", "ui"),
                                        close_fds=True)
    except OSError:
      self.text_proc = None

            

Reported by Bandit.

selfdrive/controls/lib/alertmanager.py
2 issues
No name 'car' in module 'cereal'
Error

Line: 6 Column: 1

              import json
from typing import List, Optional

from cereal import car, log
from common.basedir import BASEDIR
from common.params import Params
from common.realtime import DT_CTRL
from selfdrive.controls.lib.events import Alert
from selfdrive.swaglog import cloudlog

            

Reported by Pylint.

No name 'log' in module 'cereal'
Error

Line: 6 Column: 1

              import json
from typing import List, Optional

from cereal import car, log
from common.basedir import BASEDIR
from common.params import Params
from common.realtime import DT_CTRL
from selfdrive.controls.lib.events import Alert
from selfdrive.swaglog import cloudlog

            

Reported by Pylint.

selfdrive/debug/live_cpu_and_temp.py
2 issues
Unable to import 'cereal.messaging'
Error

Line: 4 Column: 1

              #!/usr/bin/env python3
import argparse

from cereal.messaging import SubMaster
from common.numpy_fast import mean


def cputime_total(ct):
  return ct.user + ct.nice + ct.system + ct.idle + ct.iowait + ct.irq + ct.softirq

            

Reported by Pylint.

No name 'messaging' in module 'cereal'
Error

Line: 4 Column: 1

              #!/usr/bin/env python3
import argparse

from cereal.messaging import SubMaster
from common.numpy_fast import mean


def cputime_total(ct):
  return ct.user + ct.nice + ct.system + ct.idle + ct.iowait + ct.irq + ct.softirq

            

Reported by Pylint.

selfdrive/debug/show_matching_cars.py
2 issues
No name 'messaging' in module 'cereal'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
import cereal.messaging as messaging


# rav4 2019 and corolla tss2
fingerprint = {896: 8, 898: 8, 900: 6, 976: 1, 1541: 8, 902: 6, 905: 8, 810: 2, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1552: 8, 1553: 8, 1556: 8, 1571: 8, 921: 8, 1056: 8, 544: 4, 1570: 8, 1059: 1, 36: 8, 37: 8, 550: 8, 935: 8, 552: 4, 170: 8, 812: 8, 944: 8, 945: 8, 562: 6, 180: 8, 1077: 8, 951: 8, 1592: 8, 1076: 8, 186: 4, 955: 8, 956: 8, 1001: 8, 705: 8, 452: 8, 1788: 8, 464: 8, 824: 8, 466: 8, 467: 8, 761: 8, 728: 8, 1572: 8, 1114: 8, 933: 8, 800: 8, 608: 8, 865: 8, 610: 8, 1595: 8, 934: 8, 998: 5, 1745: 8, 1000: 8, 764: 8, 1002: 8, 999: 7, 1789: 8, 1649: 8, 1779: 8, 1568: 8, 1017: 8, 1786: 8, 1787: 8, 1020: 8, 426: 6, 1279: 8}

candidate_cars = all_legacy_fingerprint_cars()

            

Reported by Pylint.

Unable to import 'cereal.messaging'
Error

Line: 3 Column: 1

              #!/usr/bin/env python3
from selfdrive.car.fingerprints import eliminate_incompatible_cars, all_legacy_fingerprint_cars
import cereal.messaging as messaging


# rav4 2019 and corolla tss2
fingerprint = {896: 8, 898: 8, 900: 6, 976: 1, 1541: 8, 902: 6, 905: 8, 810: 2, 1164: 8, 1165: 8, 1166: 8, 1167: 8, 1552: 8, 1553: 8, 1556: 8, 1571: 8, 921: 8, 1056: 8, 544: 4, 1570: 8, 1059: 1, 36: 8, 37: 8, 550: 8, 935: 8, 552: 4, 170: 8, 812: 8, 944: 8, 945: 8, 562: 6, 180: 8, 1077: 8, 951: 8, 1592: 8, 1076: 8, 186: 4, 955: 8, 956: 8, 1001: 8, 705: 8, 452: 8, 1788: 8, 464: 8, 824: 8, 466: 8, 467: 8, 761: 8, 728: 8, 1572: 8, 1114: 8, 933: 8, 800: 8, 608: 8, 865: 8, 610: 8, 1595: 8, 934: 8, 998: 5, 1745: 8, 1000: 8, 764: 8, 1002: 8, 999: 7, 1789: 8, 1649: 8, 1779: 8, 1568: 8, 1017: 8, 1786: 8, 1787: 8, 1020: 8, 426: 6, 1279: 8}

candidate_cars = all_legacy_fingerprint_cars()

            

Reported by Pylint.

pyextra/acados_template/c_templates_tera/acados_solver_sfun.in.c
2 issues
Unmatched '{'. Configuration: 'MATLAB_MEX_FILE'.
Error

Line: 633

                  }
  {%- endif %}

  {%- if simulink_opts.inputs.u_init %}  {#- u_init #}
    // u_init
    {%- set i_input = i_input + 1 %}
    in_sign = ssGetInputPortRealSignalPtrs(S, {{ i_input }});
    for (int ii = 0; ii < {{ dims.N }}; ii++)
    {

            

Reported by Cppcheck.

Unmatched '{'. Configuration: ''.
Error

Line: 633

                  }
  {%- endif %}

  {%- if simulink_opts.inputs.u_init %}  {#- u_init #}
    // u_init
    {%- set i_input = i_input + 1 %}
    in_sign = ssGetInputPortRealSignalPtrs(S, {{ i_input }});
    for (int ii = 0; ii < {{ dims.N }}; ii++)
    {

            

Reported by Cppcheck.