Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/fosslight_binary/_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ def __init__(self, value):
self.vulnerability_items = []
self.binary_name_without_path = ""
self.bin_name_with_path = value
self.found_in_owasp = False
self.is_binary = True
self.found_in_owasp = False
self.found_in_bin_db = False # for debugging

def __del__(self):
pass
Expand Down
11 changes: 10 additions & 1 deletion src/fosslight_binary/_binary_dao.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,20 @@ def get_oss_info_from_db(bin_info_list, dburl=""):
for idx, row in df_result.iterrows():
if not item.found_in_owasp:
oss_from_db = OssItem(row['ossname'], row['ossversion'], row['license'])
bin_oss_items.append(oss_from_db)

if bin_oss_items:
if not any(oss_item.name == oss_from_db.name
and oss_item.version == oss_from_db.version
and oss_item.license == oss_from_db.license
for oss_item in bin_oss_items):
bin_oss_items.append(oss_from_db)
else:
bin_oss_items.append(oss_from_db)

if bin_oss_items:
item.set_oss_items(bin_oss_items)
item.comment = "Binary DB result"
item.found_in_binary = True

disconnect_lge_bin_db()
return bin_info_list, _cnt_auto_identified
Expand Down
Loading