You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behabiour:
Just print empty table and ignore invalid purl.
Actual behaviour:
Crash with AttributeError
Version/platform info
Version of CVE-bin-tool( e.g. output of cve-bin-tool --version):
Installed from pypi or github?
3.2.2dev0 (installed from Github e58be27)
Operating system: Linux/Windows (other platforms are unsupported but feel free to report issues anyhow)
Linux andreas-VirtualBox 5.15.0-78-generic #85~20.04.1-Ubuntu SMP Mon Jul 17 09:42:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Python 3.9.16
Running in any particular CI environment we should know about? no
Anything else?
Happy to help with an PR, but unsure where to fix the issue, checking before printing or in the context of purl parsing.
The text was updated successfully, but these errors were encountered:
Looks like we need probably an if statement checking for none somewhere.
I'd start by putting it in the printing since that's where the error is occurring and probably if we can't find a purl it's somewhat reasonable to have a None-type in there somewhere. But the purl parsing itself is relatively new so we could need some tweaking there too. here's the PR that added it, which should narrow down the search of where to put a fix: fa8e6d8
Description
Console output crashes while printing Products with No Identified Vulnerabilities Table if given an invalid purl which then result in a
None
version.To reproduce
Steps to reproduce the behaviour:
cve-bin-tool --sbom cyclonedx --sbom-file minimal_example.json
AttributeError: 'NoneType' object has no attribute 'translate'
when trying to outputas version is product_data.version is
None
Expected behabiour:
Just print empty table and ignore invalid purl.
Actual behaviour:
Crash with
AttributeError
Version/platform info
Version of CVE-bin-tool( e.g. output of
cve-bin-tool --version
):Installed from pypi or github?
3.2.2dev0 (installed from Github e58be27)
Operating system: Linux/Windows (other platforms are unsupported but feel free to report issues anyhow)
Linux andreas-VirtualBox 5.15.0-78-generic #85~20.04.1-Ubuntu SMP Mon Jul 17 09:42:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Python 3.9.16
Running in any particular CI environment we should know about? no
Anything else?
Happy to help with an PR, but unsure where to fix the issue, checking before printing or in the context of purl parsing.
The text was updated successfully, but these errors were encountered: