Skip to main content

Python library to interface into Tenable's products and applications

Project description

https://travis-ci.org/tenable/pyTenable.svg?branch=master https://img.shields.io/pypi/v/pytenable.svg https://img.shields.io/pypi/pyversions/pyTenable.svg https://img.shields.io/pypi/dm/pyTenable.svg https://img.shields.io/github/license/tenable/pyTenable.svg

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.

Installation

To install the most recent published version to pypi, its simply a matter of installing via pip:

pip install pytenable

If your 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('TIO_ACCESS_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('SECURITYCENTER_NETWORK_ADDRESS')
sc.login('SC_USERNAME', 'SC_PASSWORD')
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.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyTenable-0.3.18.tar.gz (115.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page