From 8b04ed3aed3a759ad1c8b9fd06bd7ed1c9f6d1f4 Mon Sep 17 00:00:00 2001 From: "gioacchino.vino" <gioacchino.vino@infn.it> Date: Tue, 9 Jan 2024 15:27:31 +0100 Subject: [PATCH] Reviewed scan python code --- files/utilities.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/files/utilities.py b/files/utilities.py index 6aaf604..b5e4d87 100644 --- a/files/utilities.py +++ b/files/utilities.py @@ -1,11 +1,13 @@ import json import logging +from typing import Dict SSH_PORT: str = '22' + HTTP_PORT: str = '80' HTTPS_PORT: str = '443' -def import_dep_info(file_path: str, endpoint_keys: str) -> dict[str,list[str]]: +def import_dep_info(file_path: str, endpoint_keys: str) -> Dict[str,list[str]]: with open(file_path) as f: data = json.load(f) @@ -42,7 +44,7 @@ def import_dep_info(file_path: str, endpoint_keys: str) -> dict[str,list[str]]: endpoints[host] = sorted(list(ports)) return endpoints -def process_global_reports_info(reports: dict) -> dict: +def process_global_reports_info(reports: Dict) -> Dict: glob_severity = -1 glob_threat = 'Log' for host in reports: -- GitLab