Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WAS Export function raises: TypeError: 'NoneType' object is not subscriptable #861

Open
1core0 opened this issue Dec 12, 2024 · 0 comments
Labels
bug This is a bug with the pyTenable library Tenable.io Tenable.io Package

Comments

@1core0
Copy link

1core0 commented Dec 12, 2024

Describe the bug
As the VM export does not display any WAS finding, I used the export function in the WAS API.
The function raises an error stating the object is type of "NoneType" and therefore not subscriptable - even though findings exists on the instance.

To Reproduce

> ptpython
>>> from tenable.io import TenableIO
>>> tvm = TenableIO()
>>> tvm.was.export()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.13/site-packages/tenable/io/was/api.py", line 61, in export
    parent_scan_ids_with_finalized_at = [_parent_id_with_finalized_at(sc) for sc in scan_config if sc]
                                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^
  File "/opt/homebrew/lib/python3.13/site-packages/tenable/io/was/api.py", line 183, in _parent_id_with_finalized_at
    "parent_scan_id": scan_config["last_scan"]["scan_id"],
                      ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

Expected behavior
Fetch Web Application Scan results

Screenshots
image

System Information (please complete the following information):

  • OS: MacOS
  • 64-bit

Additional context

Name: pyTenable
Version: 1.6.0

@SteveMcGrath SteveMcGrath added bug This is a bug with the pyTenable library Tenable.io Tenable.io Package labels Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug with the pyTenable library Tenable.io Tenable.io Package
Projects
None yet
Development

No branches or pull requests

2 participants