fosslight-binary 5.1.4__tar.gz → 5.1.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/PKG-INFO +1 -1
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/requirements.txt +1 -1
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/setup.py +1 -1
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/_binary.py +10 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/binary_analysis.py +5 -3
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/PKG-INFO +1 -1
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/requires.txt +1 -1
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/LICENSE +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/LICENSES/Apache-2.0.txt +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/LICENSES/LicenseRef-3rd_party_licenses.txt +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/MANIFEST.in +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/README.md +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/setup.cfg +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/__init__.py +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/_binary_dao.py +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/_help.py +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/_jar_analysis.py +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/_simple_mode.py +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary/cli.py +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/SOURCES.txt +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/dependency_links.txt +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/entry_points.txt +0 -0
- {fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/top_level.txt +0 -0
|
@@ -4,9 +4,14 @@
|
|
|
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 @@ class BinaryItem(FileItem):
|
|
|
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,
|
|
@@ -21,6 +21,7 @@ from ._jar_analysis import analyze_jar_file, merge_binary_list
|
|
|
21
21
|
from ._simple_mode import print_simple_mode, filter_binary, init_simple
|
|
22
22
|
from fosslight_util.correct import correct_with_yaml
|
|
23
23
|
from fosslight_util.oss_item import ScannerItem
|
|
24
|
+
from fosslight_util.exclude import excluding_files
|
|
24
25
|
import hashlib
|
|
25
26
|
import tlsh
|
|
26
27
|
from io import open
|
|
@@ -132,7 +133,7 @@ def init(path_to_find_bin, output_file_name, formats, path_to_exclude=[]):
|
|
|
132
133
|
error_occured(error_msg=msg,
|
|
133
134
|
result_log=_result_log,
|
|
134
135
|
exit=True)
|
|
135
|
-
return _result_log, combined_paths_and_files, output_extensions
|
|
136
|
+
return _result_log, combined_paths_and_files, output_extensions, formats
|
|
136
137
|
|
|
137
138
|
|
|
138
139
|
def get_file_list(path_to_find, abs_path_to_exclude):
|
|
@@ -195,7 +196,7 @@ def find_binaries(path_to_find_bin, output_dir, formats, dburl="", simple_mode=F
|
|
|
195
196
|
mode = "Simple Mode"
|
|
196
197
|
_result_log, compressed_list_txt, simple_bin_list_txt = init_simple(output_dir, PKG_NAME, start_time)
|
|
197
198
|
else:
|
|
198
|
-
_result_log, result_reports, output_extensions = init(
|
|
199
|
+
_result_log, result_reports, output_extensions, formats = init(
|
|
199
200
|
path_to_find_bin, output_dir, formats, path_to_exclude)
|
|
200
201
|
|
|
201
202
|
total_bin_cnt = 0
|
|
@@ -206,7 +207,8 @@ def find_binaries(path_to_find_bin, output_dir, formats, dburl="", simple_mode=F
|
|
|
206
207
|
results = []
|
|
207
208
|
bin_list = []
|
|
208
209
|
scan_item = ScannerItem(PKG_NAME, "")
|
|
209
|
-
|
|
210
|
+
exclude_path = excluding_files(path_to_exclude, path_to_find_bin)
|
|
211
|
+
abs_path_to_exclude = [os.path.abspath(path) for path in exclude_path]
|
|
210
212
|
|
|
211
213
|
if not os.path.isdir(path_to_find_bin):
|
|
212
214
|
error_occured(error_msg=f"(-p option) Can't find the directory: {path_to_find_bin}",
|
|
File without changes
|
|
File without changes
|
{fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/LICENSES/LicenseRef-3rd_party_licenses.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.4 → fosslight_binary-5.1.6}/src/fosslight_binary.egg-info/top_level.txt
RENAMED
|
File without changes
|