File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 44# SPDX-License-Identifier: Apache-2.0
55from fosslight_util .oss_item import FileItem
66import urllib .parse
7+ import logging
8+ import fosslight_util .constant as constant
79
810EXCLUDE_TRUE_VALUE = "Exclude"
911TLSH_CHECKSUM_NULL = "0"
12+ MAX_EXCEL_URL_LENGTH = 255
13+
14+ logger = logging .getLogger (constant .LOGGER_NAME )
1015
1116
1217class VulnerabilityItem :
@@ -58,6 +63,11 @@ def get_print_array(self):
5863 lic = "," .join (oss .license )
5964 exclude = EXCLUDE_TRUE_VALUE if (self .exclude or oss .exclude ) else ""
6065 nvd_url = self .get_vulnerability_items ()
66+ if nvd_url and len (nvd_url ) > MAX_EXCEL_URL_LENGTH :
67+ logger .info (f"self.source_name_or_path: { self .source_name_or_path } " )
68+ logger .info (f"oss name: { oss .name } " )
69+ logger .info (f"length_url:{ len (nvd_url )} , nvd_url: { nvd_url } " )
70+ nvd_url = nvd_url [:242 ] + '...(truncated)'
6171 items .append ([self .source_name_or_path , oss .name , oss .version ,
6272 lic , oss .download_location , oss .homepage ,
6373 oss .copyright , exclude , oss .comment ,
You can’t perform that action at this time.
0 commit comments