GitHub - tenable/pyTenable: Python Library for interfacing into Tenable's platform APIs · GitHub
Skip to content You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert Branches Tags Open more actions menu Latest commit History 1,907 Commits 1,907 Commits Folders and files Name Name Last commit message Last commit date .github .github docs docs examples examples tenable tenable tests tests .actrc .actrc .coveragerc .coveragerc .gitignore .gitignore .readthedocs.yml .readthedocs.yml .snyk .snyk CHANGELOG.md CHANGELOG.md Justfile Justfile LICENSE LICENSE README.rst README.rst codebook.toml codebook.toml pyproject.toml pyproject.toml uv.lock uv.lock Repository files navigation Welcome to pyTenable's documentation! pyTenable is intended to be a pythonic interface into the Tenable application APIs.
Further by providing a common interface and a common structure between all of the various applications, we can ease the transition from the vastly different APIs between some of the products. Issue Tracker: https://github.com/tenable/pyTenable/issues Github Repository: https://github.com/tenable/pyTenable Docs: https://pytenable.readthedocs.io Installation To install the most recent published version to pypi, its simply a matter of installing via pip: pip install pytenable If you're looking for bleeding-edge, then feel free to install directly from the github repository like so: pip install git+git://github.com/tenable/pytenable.git#egg=pytenable Getting Started Lets assume that we want to get the list of scans that have been run on our Tenable.io application.
Performing this action is as simple as the following: from tenable . io import TenableIO tio = TenableIO ( access_key = 'TIO_ACCESS_KEY' , secret_key = 'TIO_SECRET_KEY' ) for scan in tio . scans . list (): print ( '{status}: {id}/{uuid} - {name}' . format ( ** scan )) Getting started with Tenable.sc is equally as easy: from tenable . sc import TenableSC sc = TenableSC ( url = 'https://SC_URL' , access_key = 'AKEY' , secret_key = 'SKEY' ) for vuln in sc . analysis . vulns (): print ( '{ip}:{pluginID}:{pluginName}' . format ( ** vuln )) For more detailed information on whats available, please refer to the pyTenable Documentation Logging Enabling logging for pyTenable is a simple matter of enabling debug logs through the python logging package.
An easy example is detailed here: import logging logging . basicConfig ( level = logging . DEBUG ) License The project is licensed under the MIT license. About Python Library for interfacing into Tenable's platform APIs pytenable.readthedocs.io Topics nessus python tenable tenablead tenableio tenableot tenablesc Resources Readme MIT license Contributing Contributing Security policy Security policy Activity Custom properties Stars 422 stars Watchers 41 watching Forks 192 forks Report repository Releases Used by Contributors Languages You can’t perform that action at this time.