fosslight-binary 5.1.3__tar.gz → 5.1.5__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.3 → fosslight_binary-5.1.5}/PKG-INFO +1 -1
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/setup.py +1 -1
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/_binary.py +5 -3
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/_binary_dao.py +10 -1
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/binary_analysis.py +2 -2
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/PKG-INFO +1 -1
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/LICENSE +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/LICENSES/Apache-2.0.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/LICENSES/LicenseRef-3rd_party_licenses.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/MANIFEST.in +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/README.md +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/requirements.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/setup.cfg +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/__init__.py +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/_help.py +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/_jar_analysis.py +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/_simple_mode.py +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary/cli.py +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/SOURCES.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/dependency_links.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/entry_points.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/requires.txt +0 -0
- {fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/top_level.txt +0 -0
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
# Copyright (c) 2020 LG Electronics Inc.
|
|
4
4
|
# SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
from fosslight_util.oss_item import FileItem
|
|
6
|
+
import urllib.parse
|
|
6
7
|
|
|
7
8
|
EXCLUDE_TRUE_VALUE = "Exclude"
|
|
8
9
|
TLSH_CHECKSUM_NULL = "0"
|
|
@@ -28,8 +29,9 @@ class BinaryItem(FileItem):
|
|
|
28
29
|
self.vulnerability_items = []
|
|
29
30
|
self.binary_name_without_path = ""
|
|
30
31
|
self.bin_name_with_path = value
|
|
31
|
-
self.found_in_owasp = False
|
|
32
32
|
self.is_binary = True
|
|
33
|
+
self.found_in_owasp = False
|
|
34
|
+
self.found_in_bin_db = False # for debugging
|
|
33
35
|
|
|
34
36
|
def __del__(self):
|
|
35
37
|
pass
|
|
@@ -43,8 +45,8 @@ class BinaryItem(FileItem):
|
|
|
43
45
|
self.oss_items.extend(new_oss_list)
|
|
44
46
|
|
|
45
47
|
def get_vulnerability_items(self):
|
|
46
|
-
nvd_url = [vul_item.nvd_url for vul_item in self.vulnerability_items]
|
|
47
|
-
return ", ".join(nvd_url)
|
|
48
|
+
nvd_url = [urllib.parse.unquote(vul_item.nvd_url) for vul_item in self.vulnerability_items]
|
|
49
|
+
return ", ".join(nvd_url).strip()
|
|
48
50
|
|
|
49
51
|
def get_print_binary_only(self):
|
|
50
52
|
return (self.source_name_or_path + "\t" + self.checksum + "\t" + self.tlsh)
|
|
@@ -43,11 +43,20 @@ def get_oss_info_from_db(bin_info_list, dburl=""):
|
|
|
43
43
|
for idx, row in df_result.iterrows():
|
|
44
44
|
if not item.found_in_owasp:
|
|
45
45
|
oss_from_db = OssItem(row['ossname'], row['ossversion'], row['license'])
|
|
46
|
-
|
|
46
|
+
|
|
47
|
+
if bin_oss_items:
|
|
48
|
+
if not any(oss_item.name == oss_from_db.name
|
|
49
|
+
and oss_item.version == oss_from_db.version
|
|
50
|
+
and oss_item.license == oss_from_db.license
|
|
51
|
+
for oss_item in bin_oss_items):
|
|
52
|
+
bin_oss_items.append(oss_from_db)
|
|
53
|
+
else:
|
|
54
|
+
bin_oss_items.append(oss_from_db)
|
|
47
55
|
|
|
48
56
|
if bin_oss_items:
|
|
49
57
|
item.set_oss_items(bin_oss_items)
|
|
50
58
|
item.comment = "Binary DB result"
|
|
59
|
+
item.found_in_binary = True
|
|
51
60
|
|
|
52
61
|
disconnect_lge_bin_db()
|
|
53
62
|
return bin_info_list, _cnt_auto_identified
|
|
@@ -132,7 +132,7 @@ def init(path_to_find_bin, output_file_name, formats, path_to_exclude=[]):
|
|
|
132
132
|
error_occured(error_msg=msg,
|
|
133
133
|
result_log=_result_log,
|
|
134
134
|
exit=True)
|
|
135
|
-
return _result_log, combined_paths_and_files, output_extensions
|
|
135
|
+
return _result_log, combined_paths_and_files, output_extensions, formats
|
|
136
136
|
|
|
137
137
|
|
|
138
138
|
def get_file_list(path_to_find, abs_path_to_exclude):
|
|
@@ -195,7 +195,7 @@ def find_binaries(path_to_find_bin, output_dir, formats, dburl="", simple_mode=F
|
|
|
195
195
|
mode = "Simple Mode"
|
|
196
196
|
_result_log, compressed_list_txt, simple_bin_list_txt = init_simple(output_dir, PKG_NAME, start_time)
|
|
197
197
|
else:
|
|
198
|
-
_result_log, result_reports, output_extensions = init(
|
|
198
|
+
_result_log, result_reports, output_extensions, formats = init(
|
|
199
199
|
path_to_find_bin, output_dir, formats, path_to_exclude)
|
|
200
200
|
|
|
201
201
|
total_bin_cnt = 0
|
|
File without changes
|
|
File without changes
|
{fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/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.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/requires.txt
RENAMED
|
File without changes
|
{fosslight_binary-5.1.3 → fosslight_binary-5.1.5}/src/fosslight_binary.egg-info/top_level.txt
RENAMED
|
File without changes
|