Closed mzpqnxow closed 2 years ago
I've created PR #552 for this
Please let me know what you think about this, it would be great if you could merge this as I try to avoid having constraints.txt
entries and/or setup.cfg git+https://...
dependencies that point to personal forks/branches
Thanks again!
TypeError in NessusReportv2::_defs when trying to convert NoneType to float
I'm using
TenableIO.scans.export()
with a filter to export only a specificplugin_id
and am encountering an exception when iterating over aNessusReportv2
object, which I'm creating from aBytesIO
objectDetails
I'm encountering an exception here:
https://github.com/tenable/pyTenable/blob/6661f516fb2be54f95ea6e39b8970bb05357649b/tenable/reports/nessusv2.py#L55-L57
Relevant Code
The code I'm using is as follows:
Traceback
Brief Analysis / Root-Cause / Fix
I initially suspected the
byte_stream: BytesIO
object might be corrupted in some way, but I found that the following change fixed the issue and produced proper report rows:With that change, the
NessusReportv2
iterator works as expected and all is well :>NOTE: It's probably worth mentioning that
plugin_id = 19506
is a special summary plugin, so there wouldn't ever be a CVSS score associated with itConclusion
This seems to me like a bug in in
NessusReportv2::_defs ()
, perhaps only manifesting for this specificplugin_id
pyTenable
, but it seems unlikely to me that this is my "fault" since the interface and use-pattern is pretty well-documented and simple (and I've been using it for quite a while)Thanks!