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
Severity: Info
Found in bin/retrieve_dns.py by bandit

Starting a process with a partial executable path
Open

            p = subprocess.Popen(["qhost", "-F", "-xml"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
Severity: Info
Found in apel/parsers/sge.py by bandit

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

Severity: Info
Found in apel/db/records/storage.py by bandit

Wrong continued indentation (add 4 spaces).
Open

                              ldap.SCOPE_SUBTREE,
Severity: Info
Found in apel/ldap/query.py by pylint

TODO ldap.SCOPE_SUBTREE, ^ |

Variable name BACKENDS doesn't conform to snake_case naming style
Open

        BACKENDS = {}
Severity: Info
Found in apel/db/apeldb.py by pylint

Used when the name doesn't conform to naming rules associated to its type (constant, variable, class...).

Unnecessary pass statement
Open

        pass
Severity: Minor
Found in apel/db/apeldb.py by pylint

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 ] ))
Severity: Info
Found in apel/db/unloader.py by pylint

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):
Severity: Info
Found in apel/ldap/query.py by pylint

Used when a function or method has too many local variables.

Variable name wh doesn't conform to snake_case naming style
Open

                wh = '('
Severity: Info
Found in apel/db/apeldb.py by pylint

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 ] ))
Severity: Info
Found in apel/db/unloader.py by pylint

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
Severity: Info
Found in apel/db/unloader.py by pylint

Used when code and imports are mixed

Wrong continued indentation (add 4 spaces).
Open

                           Decimal(capability.split('=')[1])))
Severity: Info
Found in apel/ldap/query.py by pylint

TODO Decimal(capability.split('=')[1]))) ^ |

No space allowed before bracket
Open

        start_tuple = [ int(x) for x in start.split('-') ]
Severity: Info
Found in apel/db/unloader.py by pylint

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 ] ))
Severity: Info
Found in apel/db/unloader.py by pylint

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 ] ))
Severity: Info
Found in apel/db/unloader.py by pylint

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,
Severity: Info
Found in apel/db/unloader.py by pylint

Used when code and imports are mixed

Variable name e doesn't conform to snake_case naming style
Open

            except (KeyError, IndexError) as e:
Severity: Info
Found in apel/ldap/query.py by pylint

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):
Severity: Info
Found in apel/db/apeldb.py by pylint

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):
Severity: Info
Found in apel/db/apeldb.py by pylint

Used when a function or method takes too many arguments.

Unnecessary pass statement
Open

        pass
Severity: Minor
Found in apel/db/apeldb.py by pylint

Used when a pass statement that can be avoided is encountered.

Severity
Category
Status
Source
Language