fosslight-binary 5.1.2__tar.gz → 5.1.4__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.
Files changed (23) hide show
  1. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/PKG-INFO +2 -2
  2. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/README.md +1 -1
  3. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/setup.py +1 -1
  4. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/_binary.py +5 -3
  5. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/_binary_dao.py +10 -1
  6. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/binary_analysis.py +2 -0
  7. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary.egg-info/PKG-INFO +2 -2
  8. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/LICENSE +0 -0
  9. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/LICENSES/Apache-2.0.txt +0 -0
  10. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/LICENSES/LicenseRef-3rd_party_licenses.txt +0 -0
  11. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/MANIFEST.in +0 -0
  12. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/requirements.txt +0 -0
  13. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/setup.cfg +0 -0
  14. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/__init__.py +0 -0
  15. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/_help.py +0 -0
  16. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/_jar_analysis.py +0 -0
  17. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/_simple_mode.py +0 -0
  18. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary/cli.py +0 -0
  19. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary.egg-info/SOURCES.txt +0 -0
  20. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary.egg-info/dependency_links.txt +0 -0
  21. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary.egg-info/entry_points.txt +0 -0
  22. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary.egg-info/requires.txt +0 -0
  23. {fosslight_binary-5.1.2 → fosslight_binary-5.1.4}/src/fosslight_binary.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fosslight_binary
3
- Version: 5.1.2
3
+ Version: 5.1.4
4
4
  Summary: FOSSLight Binary Scanner
5
5
  Home-page: https://github.com/fosslight/fosslight_binary_scanner
6
6
  Author: LG Electronics
@@ -25,7 +25,7 @@ Description: <!--
25
25
  ## 👏 Contributing Guide
26
26
 
27
27
  We always welcome your contributions.
28
- Please see the [CONTRIBUTING guide](https://fosslight.org/fosslight-guide-en/learn/1_contribution.html) for how to contribute.
28
+ Please see the [CONTRIBUTING guide](https://fosslight.org/hub-guide-en/contribution/1_contribution.html) for how to contribute.
29
29
 
30
30
 
31
31
  ## 📄 License
@@ -17,7 +17,7 @@ Please see the [**User Guide**](https://fosslight.org/fosslight-guide-en/scanner
17
17
  ## 👏 Contributing Guide
18
18
 
19
19
  We always welcome your contributions.
20
- Please see the [CONTRIBUTING guide](https://fosslight.org/fosslight-guide-en/learn/1_contribution.html) for how to contribute.
20
+ Please see the [CONTRIBUTING guide](https://fosslight.org/hub-guide-en/contribution/1_contribution.html) for how to contribute.
21
21
 
22
22
 
23
23
  ## 📄 License
@@ -33,7 +33,7 @@ if __name__ == "__main__":
33
33
 
34
34
  setup(
35
35
  name=_PACKAEG_NAME,
36
- version='5.1.2',
36
+ version='5.1.4',
37
37
  package_dir={"": "src"},
38
38
  packages=find_packages(where='src'),
39
39
  description='FOSSLight Binary Scanner',
@@ -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
- bin_oss_items.append(oss_from_db)
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
@@ -63,6 +63,8 @@ def get_checksum_and_tlsh(bin_with_path):
63
63
  checksum_value = str(sha1_hash.hexdigest())
64
64
  try:
65
65
  tlsh_value = str(tlsh.hash(byte))
66
+ if tlsh_value == "TNULL" or (not tlsh_value):
67
+ tlsh_value = TLSH_CHECKSUM_NULL
66
68
  except:
67
69
  tlsh_value = TLSH_CHECKSUM_NULL
68
70
  f.close()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fosslight-binary
3
- Version: 5.1.2
3
+ Version: 5.1.4
4
4
  Summary: FOSSLight Binary Scanner
5
5
  Home-page: https://github.com/fosslight/fosslight_binary_scanner
6
6
  Author: LG Electronics
@@ -25,7 +25,7 @@ Description: <!--
25
25
  ## 👏 Contributing Guide
26
26
 
27
27
  We always welcome your contributions.
28
- Please see the [CONTRIBUTING guide](https://fosslight.org/fosslight-guide-en/learn/1_contribution.html) for how to contribute.
28
+ Please see the [CONTRIBUTING guide](https://fosslight.org/hub-guide-en/contribution/1_contribution.html) for how to contribute.
29
29
 
30
30
 
31
31
  ## 📄 License