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 4
4
# SPDX-License-Identifier: Apache-2.0
5
5
from fosslight_util .oss_item import FileItem
6
6
import urllib .parse
7
+ import logging
8
+ import fosslight_util .constant as constant
7
9
8
10
EXCLUDE_TRUE_VALUE = "Exclude"
9
11
TLSH_CHECKSUM_NULL = "0"
12
+ MAX_EXCEL_URL_LENGTH = 255
13
+
14
+ logger = logging .getLogger (constant .LOGGER_NAME )
10
15
11
16
12
17
class VulnerabilityItem :
@@ -58,6 +63,11 @@ def get_print_array(self):
58
63
lic = "," .join (oss .license )
59
64
exclude = EXCLUDE_TRUE_VALUE if (self .exclude or oss .exclude ) else ""
60
65
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)'
61
71
items .append ([self .source_name_or_path , oss .name , oss .version ,
62
72
lic , oss .download_location , oss .homepage ,
63
73
oss .copyright , exclude , oss .comment ,
You can’t perform that action at this time.
0 commit comments