Showing 1,562 of 1,569 total issues
Using xml.dom.minidom to parse untrusted XML data is known to be vulnerable to XML attacks. Replace xml.dom.minidom with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called. Open
import xml.dom.minidom
- Exclude checks
Starting a process with a partial executable path Open
p = subprocess.Popen(["qhost", "-F", "-xml"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- Exclude checks
Using Document to parse untrusted XML data is known to be vulnerable to XML attacks. Replace Document with the equivalent defusedxml package, or make sure defusedxml.defuse_stdlib() is called. Open
from xml.dom.minidom import Document
- Exclude checks
Wrong continued indentation (add 4 spaces). Open
ldap.SCOPE_SUBTREE,
- Read upRead up
- Exclude checks
TODO ldap.SCOPE_SUBTREE, ^ |
Variable name BACKENDS
doesn't conform to snake_case naming style Open
BACKENDS = {}
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Unnecessary pass statement Open
pass
- Read upRead up
- Exclude checks
Used when a pass
statement that can be avoided is encountered.
No space allowed after bracket Open
buf.write('\n'.join( [ record.get_ur(self._withhold_dns) for record in records ] ))
- Read upRead up
- Exclude checks
Used when a wrong number of spaces is used around an operator, bracket or block opener. buf.write('n'.join( [ record.getur(self.withhold_dns) for record in records ] )) ^
Too many local variables (22/15) Open
def fetch_specint(site, host='lcg-bdii.egi.eu', port=2170):
- Read upRead up
- Exclude checks
Used when a function or method has too many local variables.
Variable name wh
doesn't conform to snake_case naming style Open
wh = '('
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
No space allowed after bracket Open
buf.write('\n'.join( [ record.get_ur(self._withhold_dns) for record in records ] ))
- Read upRead up
- Exclude checks
Used when a wrong number of spaces is used around an operator, bracket or block opener. buf.write('n'.join( [ record.getur(self.withhold_dns) for record in records ] )) ^
Import import logging
should be placed at the top of the module Open
import logging
- Read upRead up
- Exclude checks
Used when code and imports are mixed
Wrong continued indentation (add 4 spaces). Open
Decimal(capability.split('=')[1])))
- Read upRead up
- Exclude checks
TODO Decimal(capability.split('=')[1]))) ^ |
No space allowed before bracket Open
start_tuple = [ int(x) for x in start.split('-') ]
- Read upRead up
- Exclude checks
Used when a wrong number of spaces is used around an operator, bracket or block opener. start_tuple = [ int(x) for x in start.split('-') ] ^
No space allowed before bracket Open
buf.write('\n'.join( [ record.get_ur(self._withhold_dns) for record in records ] ))
- Read upRead up
- Exclude checks
Used when a wrong number of spaces is used around an operator, bracket or block opener. buf.write('n'.join( [ record.getur(self.withhold_dns) for record in records ] )) ^
No space allowed before bracket Open
buf.write('%%\n'.join( [ record.get_msg(self._withhold_dns) for record in records ] ))
- Read upRead up
- Exclude checks
Used when a wrong number of spaces is used around an operator, bracket or block opener. buf.write('%%n'.join( [ record.getmsg(self.withhold_dns) for record in records ] )) ^
Import from apel.db import Query, ApelDbException, JOB_MSG_HEADER, SUMMARY_MSG_HEADER, NORMALISED_SUMMARY_MSG_HEADER, SYNC_MSG_HEADER, CLOUD_MSG_HEADER, CLOUD_SUMMARY_MSG_HEADER
should be placed at the top of the module Open
from apel.db import (Query, ApelDbException, JOB_MSG_HEADER, SUMMARY_MSG_HEADER,
- Read upRead up
- Exclude checks
Used when code and imports are mixed
Variable name e
doesn't conform to snake_case naming style Open
except (KeyError, IndexError) as e:
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Argument name db
doesn't conform to snake_case naming style Open
def __new__(cls, backend, host, port, username, pwd, db):
- Read upRead up
- Exclude checks
Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).
Too many arguments (7/5) Open
def __new__(cls, backend, host, port, username, pwd, db):
- Read upRead up
- Exclude checks
Used when a function or method takes too many arguments.
Unnecessary pass statement Open
pass
- Read upRead up
- Exclude checks
Used when a pass
statement that can be avoided is encountered.