-
Notifications
You must be signed in to change notification settings - Fork 172
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
ScansAPI.create isn't using the correct Policy UUID at creation. #143
Comments
This code works:
I see the cred in the WUI as expected.
No Cred in the WUI. It seems that create scans does not like it when you try to create with a Policy either. |
So this one took a lot of UI hacking to get to the bottom of it. In the end, I have to have another call to the editor API to a previously unknown endpoint and retrieve a different UUID than what was previously assumed to work. essentially you need to call /editor/scan/policy/{POLICY_ID} to get the template UUID. I have a modified version working already, however am still working on documentation. |
Steve, I upgraded to the latest pyTenable, ran my original code, and received this error. What parameters need to be updated?
Code: |
policy should be an integer, not a string. |
Describe the bug
Credentials are not created in tio.scans.create when using parameters policy, scanner, and folder_id.
To Reproduce
Using tio.scans.create, credentials are passed and confirmed via WUI using the below Tenable provided example.
>>> scan = tio.scans.create( ... name='Example123', ... targets=['127.0.0.1'], ... credentials={'Host': {'Windows': [{ ... 'auth_method': 'Password', ... 'username': 'Admin', ... 'password': 'example', ... 'domain': '' ... }]}})
Credentials no longer populated in this example
scan = tio.scans.create( name='Rick API Scan Test14 using TIOscansCreate creds from SteveAtTenable as last block', description='Rick test api description with creds from SteveAtTenable with policy, scanner, folder_id before credentials', targets=['1.2.3.4'], policy='1234', scanner='tenablescanner', folder_id='1234, credentials={'Host': {'Windows': [{ 'auth_method': 'Password', 'username': 'Admin', 'password': 'example', 'domain': '' }]}})
Expected behavior
Credentials should populate regardless of other parameters being used.
Screenshots
This is easy to reproduce. I can add any specific screenshot upon request.
System Information (please complete the following information):
Additional context
Detailed discussion: https://community.tenable.com/s/feed/0D5f200006YeHMPCA3
The text was updated successfully, but these errors were encountered: