File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
cve_bin_tool/sbom_manager Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -123,8 +123,9 @@ def parse_sbom(self):
123123 if ref [1 ] == "purl" :
124124 # Process purl identifier
125125 purl_info = PackageURL .from_string (ref [2 ]).to_dict ()
126- modules .append ([purl_info ["name" ], purl_info ["version" ]])
127- purl_found = True
126+ if purl_info ["name" ] and purl_info ["version" ]:
127+ modules .append ([purl_info ["name" ], purl_info ["version" ]])
128+ purl_found = True
128129 if not purl_found :
129130 if package .get ("version" ) is not None :
130131 modules .append ([package ["name" ], package ["version" ]])
Original file line number Diff line number Diff line change 3333 "name" : " GLIBC" ,
3434 "version" : " 2.11.1" ,
3535 "purl" : " pkg:maven/org.gnu.glibc/glibc@2.11.1"
36+ },
37+ {
38+ "name" : " invalid_purl_package" ,
39+ "version" : " 1.1.0" ,
40+ "type" : " library" ,
41+ "purl" : " pkg:xxx/xxx/xxx"
3642 }
3743 ]
3844 }
You can’t perform that action at this time.
0 commit comments