Showing 267 of 577 total issues
Avoid deeply nested control flow statements. Open
Open
for endpoint in url["endpoints"]:
# Only add the endpoint once for a series of ratings. And only if the
# ratings is not a repeated finding.
added_endpoint = False
Avoid deeply nested control flow statements. Open
Open
for endpoint in urlrating["endpoints"]:
for rating in endpoint["ratings"]:
if rating["type"] not in measurement:
measurement[rating["type"]] = {
Avoid deeply nested control flow statements. Open
Open
if scan_type in PUBLISHED_SCAN_TYPES:
vs.urls = measurement[scan_type]["applicable_urls"]
vs.endpoints = measurement[scan_type]["applicable_endpoints"]
else:
# total
Avoid deeply nested control flow statements. Open
Open
if scan_type in ENDPOINT_SCAN_TYPES:
vs.ok = measurement[scan_type]["ok_endpoints"]
elif scan_type in URL_SCAN_TYPES:
vs.ok = measurement[scan_type]["ok_urls"]
else:
Avoid deeply nested control flow statements. Open
Open
for rating in urlrating["ratings"]:
# log.debug("- type: %s H: %s, M: %s, L: %s" %
# (rating['type'], rating['high'], rating['medium'], rating['low']))
Avoid deeply nested control flow statements. Open
Open
if (
endpoint_rating["type"] in desired_endpoint_scans
and endpoint_rating.get("comply_or_explain_valid_at_time_of_report", False) is False
):
high += endpoint_rating["high"]
Avoid deeply nested control flow statements. Open
Open
if url["url"] in noduplicates:
continue
noduplicates.append(url["url"])
Function can_connect
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def can_connect(self, protocol: str, url: str, port: int, ip_version: int) -> bool:
Function store_when_new_or_kill_if_gone
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def store_when_new_or_kill_if_gone(connected, url, port, protocol, ip_version):
Function create
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def create(cls, task: celery.Task, name: str, request, *args, **kwargs) -> "Job":
Function retrieve_endpoints_from_urls
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def retrieve_endpoints_from_urls(
Function store_url_scan_result
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def store_url_scan_result(scan_type: str, url_id: int, rating: str, message: str, evidence: str = ""):
Function kill_endpoint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def kill_endpoint(protocol: str, url_id: int, port: int, ip_version: int, origin: str = ""):
Function store_endpoint_scan_result
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def store_endpoint_scan_result(scan_type: str, endpoint_id: int, rating: str, message: str, evidence: str = ""):
Function add_url_to_new_organization
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def add_url_to_new_organization(country: str, organization_type: str, target_organization_name, url, when):
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, verbosity=1, failfast=False, keepdb=False, pdb=False, **kwargs):
Function merge
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def merge(
Function dissolve
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def dissolve(
Function save_endpoint
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def save_endpoint(protocol: str, url_id: int, port: int, ip_version: int, origin: str = ""):
Function ticker
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ticker(