fosslight-binary 5.1.5__tar.gz → 5.1.7__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.5 → fosslight_binary-5.1.7}/PKG-INFO +1 -1
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/requirements.txt +1 -1
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/setup.py +1 -1
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/_binary.py +13 -4
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/binary_analysis.py +3 -1
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/PKG-INFO +1 -1
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/requires.txt +1 -1
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/LICENSE +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/LICENSES/Apache-2.0.txt +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/LICENSES/LicenseRef-3rd_party_licenses.txt +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/MANIFEST.in +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/README.md +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/setup.cfg +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/__init__.py +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/_binary_dao.py +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/_help.py +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/_jar_analysis.py +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/_simple_mode.py +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary/cli.py +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/SOURCES.txt +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/dependency_links.txt +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/entry_points.txt +0 -0
- {fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/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:
|
|
@@ -44,9 +49,13 @@ class BinaryItem(FileItem):
|
|
|
44
49
|
# Append New input OSS
|
|
45
50
|
self.oss_items.extend(new_oss_list)
|
|
46
51
|
|
|
47
|
-
def get_vulnerability_items(self):
|
|
48
|
-
nvd_url = [urllib.parse.unquote(vul_item.nvd_url) for vul_item in self.vulnerability_items]
|
|
49
|
-
|
|
52
|
+
def get_vulnerability_items(self, oss):
|
|
53
|
+
nvd_url = set([urllib.parse.unquote(vul_item.nvd_url) for vul_item in self.vulnerability_items])
|
|
54
|
+
nvd_url = ", ".join(nvd_url).strip()
|
|
55
|
+
|
|
56
|
+
if nvd_url and len(nvd_url) > MAX_EXCEL_URL_LENGTH:
|
|
57
|
+
oss.comment += f"\nExceeded the maximum vulnerability URL length of {MAX_EXCEL_URL_LENGTH} characters."
|
|
58
|
+
return nvd_url
|
|
50
59
|
|
|
51
60
|
def get_print_binary_only(self):
|
|
52
61
|
return (self.source_name_or_path + "\t" + self.checksum + "\t" + self.tlsh)
|
|
@@ -57,7 +66,7 @@ class BinaryItem(FileItem):
|
|
|
57
66
|
for oss in self.oss_items:
|
|
58
67
|
lic = ",".join(oss.license)
|
|
59
68
|
exclude = EXCLUDE_TRUE_VALUE if (self.exclude or oss.exclude) else ""
|
|
60
|
-
nvd_url = self.get_vulnerability_items()
|
|
69
|
+
nvd_url = self.get_vulnerability_items(oss)
|
|
61
70
|
items.append([self.source_name_or_path, oss.name, oss.version,
|
|
62
71
|
lic, oss.download_location, oss.homepage,
|
|
63
72
|
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
|
|
@@ -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.5 → fosslight_binary-5.1.7}/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.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.5 → fosslight_binary-5.1.7}/src/fosslight_binary.egg-info/top_level.txt
RENAMED
|
File without changes
|