Showing 248 of 248 total issues
subprocess call - check for execution of untrusted input. Open
Open
p2 = Popen(['openssl', 'pkcs7', '-print_certs'], stdin=PIPE, stdout=PIPE,
stderr=PIPE, universal_newlines=True)
- Exclude checks
Starting a process with a partial executable path Open
Open
p1 = Popen(['openssl', 'smime', '-verify', '-CApath', capath, '-noverify'],
stdin=PIPE, stdout=PIPE, stderr=PIPE, universal_newlines=True)
- Exclude checks
Starting a process with a partial executable path Open
Open
p1 = Popen(['openssl', 'smime', '-decrypt',
'-recip', certpath, '-inkey', keypath],
stdin=PIPE, stdout=PIPE, stderr=PIPE, universal_newlines=True)
- Exclude checks
Possible hardcoded password: '' Open
Open
def __init__(self, hosts_and_ports, qpath, cert, key, dest=None, listen=None,
capath=None, check_crls=False, use_ssl=True, enc_cert=None,
verify_enc_cert=True, pidfile=None, path_type='dirq',
protocol=STOMP_MESSAGING, project=None, token=''):
"""Create an SSM2 object.
- Exclude checks
Refactor this function to reduce its Cognitive Complexity from 28 to the 15 allowed. Open
Open
def __init__(self, hosts_and_ports, qpath, cert, key, dest=None, listen=None,
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Merge this if statement with the enclosing one. Open
Open
if not crypto.verify_cert_path(self._enc_cert, self._capath, self._check_crls):
- Read upRead up
- Exclude checks
Merging collapsible if
statements increases the code's readability.
Noncompliant Code Example
if condition1: if condition2: # ...
Compliant Solution
if condition1 and condition2: # ...
Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed. Open
Open
def send_all(self):
- Read upRead up
- Exclude checks
Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.
See
Method "__init__" has 17 parameters, which is greater than the 7 authorized. Open
Open
def __init__(self, hosts_and_ports, qpath, cert, key, dest=None, listen=None,
capath=None, check_crls=False, use_ssl=True, enc_cert=None,
verify_enc_cert=True, pidfile=None, path_type='dirq',
protocol=STOMP_MESSAGING, project=None, token=''):
- Read upRead up
- Exclude checks
A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.
Noncompliant Code Example
With a maximum number of 4 parameters:
def do_something(param1, param2, param3, param4, param5): ...
Compliant Solution
def do_something(param1, param2, param3, param4): ...