From c4448bd1c09bbd3c8a1838df0da9f622569fe7c8 Mon Sep 17 00:00:00 2001 From: kaiobendrauf <38166195+kaiobendrauf@users.noreply.github.com> Date: Sat, 18 May 2024 23:57:18 +0200 Subject: [PATCH] correcting return values for conj no cves --- nudge-auto-updater.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nudge-auto-updater.py b/nudge-auto-updater.py index 6b6e2f2..aa38bc2 100755 --- a/nudge-auto-updater.py +++ b/nudge-auto-updater.py @@ -441,7 +441,6 @@ def add_subformula(match): def brackets_subformula(match): return match[0][1:-1] - # ---------------------------------------- # Check CVE Conditions # ---------------------------------------- @@ -472,15 +471,15 @@ def check_cve_scores(conditions, cves, name, days, conjunction, found=False): # conjunction -> return false if looking for at least one condition, otherwise return true for condition in ["max_baseScore", "max_exploitabilityScore", "max_impactScore", "average_baseScore", "average_exploitabilityScore", "average_impactScore"]: if condition in conditions: - return False + return False, [] if "formulas" in conditions: if len(conditions["formulas"]) > 0: - return False - return True + return False, [] + return True, [] else: # disjunction -> return false - return False - return False + return False, [] + return False, [] # behaviour if at least one cve data found for score in ["baseScore", "exploitabilityScore", "impactScore"]: if f"max_{score}" in conditions: