fix: PURL to CPE conversion results in "UNKOWN" vendor when CPE is given #4700
Labels
bug
Something isn't working
higher priority
Issues we'd like fixed sooner rather than later, often ones that come directly from users.
Milestone
Description
I have an SPDX SBOM which contains PURL and CPE data:
if I scan this with cve-bin-tool 3.4 I get:
So it seems that the PURL to CPE conversion failed to identify a vendor and overwrote a valid CPE which was present.
If I delete the PURL, it works as expected
Output:
With Version 3.3 it also works as expected (I assume there was something changed in the PURL to CPE Logic).
To reproduce
Steps to reproduce the behaviour:
cpe:2.3:a:arm:mbed_tls:3.6.0:*:*:*:*:*:*:*
andpkg:github/Mbed-TLS/[email protected]
) with e.g.cve-bin-tool --sbom spdx --sbom-file modules-deps.spdx
Expected behaviour: CVEs should be matched if CPEs are given in the SBOM
Actual behaviour: PURL to CPE fail to identify the correct vendor and still have a higher priority than the given CPE
Version/platform info
Version of CVE-bin-tool( e.g. output of
cve-bin-tool --version
): 3.4Installed from pypi or github? Pypi
Operating system: Linux Ubuntu (
Linux 5.4.0-204-generic #224-Ubuntu SMP
)Python version (e.g.
python3 --version
): Python 3.11.10Running in any particular CI environment we should know about? no
Anything else?
Feel free to add any other context here.
The text was updated successfully, but these errors were encountered: