Skip to content

Commit

Permalink
Added support to match case (Fix #69)
Browse files Browse the repository at this point in the history
match case only support from Python 3.10, I changed it to if else so it will support any other versions
  • Loading branch information
g3rzi authored Jun 22, 2023
1 parent b851b37 commit b298581
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions KubiScan.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,12 @@ def get_all_affecting_cves_table_by_version(current_k8s_version):
return cve_table

def get_cve_color(cve_severity):
match cve_severity:
case "Low":
return WHITE
case "Medium":
return LIGHTYELLOW
case "High":
return RED
case "Critical":
return RED

if cve_severity == "Low":
return WHITE
elif cve_severity == "Medium":
return LIGHTYELLOW
elif cve_severity == "High" or cve_severity == "Critical":
return RED

def get_fixed_versions_of_cve(cve_fixed_versions):
fixed_version_list = ""
Expand Down

0 comments on commit b298581

Please sign in to comment.