File tree Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Expand file tree Collapse file tree 1 file changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -133,14 +133,16 @@ def ananlyze_jar_file(path_to_find_bin):
133133 if oss_ver == "" and (product_info ['name' ] == 'Implementation-Version' or product_info ['name' ] == 'Bundle-Version' ):
134134 oss_ver = product_info ['value' ]
135135
136- oss = OssItem (oss_name , oss_ver , oss_license , oss_dl_url )
137- oss .set_comment ("OWASP Result. " )
138-
139- remove_owasp_item = owasp_items .get (file_with_path )
140- if remove_owasp_item :
141- remove_owasp_item .append (oss )
142- else :
143- owasp_items [file_with_path ] = [oss ]
136+
137+ if oss_name != "" or oss_ver != "" or oss_license != "" or oss_dl_url != "" :
138+ oss = OssItem (oss_name , oss_ver , oss_license , oss_dl_url )
139+ oss .set_comment ("OWASP Result. " )
140+
141+ remove_owasp_item = owasp_items .get (file_with_path )
142+ if remove_owasp_item :
143+ remove_owasp_item .append (oss )
144+ else :
145+ owasp_items [file_with_path ] = [oss ]
144146
145147 except Exception as ex :
146148 logger .warning (f"Error to read json file : { ex } " )
You can’t perform that action at this time.
0 commit comments