tenable / pyTenable

Python Library for interfacing into Tenable's platform APIs
https://pytenable.readthedocs.io
MIT License
354 stars 173 forks source link

Can not provide list of targets to scan launch in IO and no tests for this case #64

Closed soopanova closed 5 years ago

soopanova commented 5 years ago

Describe the bug When launching a scan by using tio.scans.launch(1, targets=['127.0.0.1']) an error is raised: tenable.errors.InvalidInputError: 02edd051198bfd0f452fa997b549c2a7:400 {"error":"Invalid 'alt_targets' field: invalid type 'string', expecting 'list'"}

To Reproduce Steps to reproduce the behavior:

  1. Create a TenableIO object (tio)
  2. Create a list of targets ex: target_list = ['127.0.0.1', '127.0.0.2']
  3. Call launch scan tio.scans.launch(1, targets=target_list)

Expected behavior The scan to launch and return the scan uuid

System Information (please complete the following information):

SteveMcGrath commented 5 years ago

I'll get 0.3.9 released within a week or so, however in the meantime, you can pull directly form the git master branch:

pip install git+https://github.com/tenable/pytenable.git

soopanova commented 5 years ago

👍