-
Notifications
You must be signed in to change notification settings - Fork 165
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
SecurityCenter scans.create(max_time: int) issue on value #760
Comments
@ve2tmq pyTenable is inline with the public documentation for the POST /scan API. I'll get back to you after getting clarity on the API side of things. |
@ve2tmq - |
Hi I understand that, but my observations indicates the unit should not be in seconds but in hours. The function works, the issue is in the doc. The doc is worng. |
Can confirm that max_time is indeed hours, not seconds in the upstream API |
Max_time in API use hours, but pytenable documentation indicate in seconds. I tried to create scan with max_time=1 and see on web SecurityCenter, I got max duration = 1 hour.
In documentation it's write: "max_time (int, optional) – The maximum amount of time that the scan may run in seconds. 0 or less for unlimited. The default is 3600 seconds."
In reality, it's not on seconds, but in hours.
I use SecurityCenter version 6.1.0
To Reproduce
from tenable.sc import TenableSC
import configparser
import warnings
warnings.filterwarnings("ignore")
class connectSC:
SC = dict()
uri = dict()
sc = connectSC()
sc.SC['my_org'].scans.create(name='Test', repo=6, max_time=1, policy_id=1000290, asset_lists=['1978'])
now check on web SecurityCenter the scan Test max duration is 1 hour. If I set to 3600, it's "Nothing Selected"
The text was updated successfully, but these errors were encountered: