INNER CODE UNIT · Python
split_cve_description
cyberark/KubiScan · KubiScan.py:125
def split_cve_description(cve_description):
words = cve_description.split()
res_description = ""
words_in_row = 10
for i, word in enumerate(words):
if i % words_in_row == 0 and i != 0:
res_description += "\n"
res_description += word + " "
return res_description[:-1]
def curr_version_is_affected(cve, current_k8s_version):
max_fixed_version = find_max_fixed_version(cve)
min_fixed_version = find_min_fixed_version(cve)
# current_k8s_version < min_fixed_version
if compare_versions(current_k8s_version, min_fixed_version) == -1:
return True
# current_k8s_version >= max_fixed_version