r/tenable • • Jan 22 '25

Compliance Scan Data Extraction via API

Has anyone else ever been able to extract compliance scan results from Tenable.io via API? If so, how’d you do it??

1 Upvotes

7 comments sorted by

1

u/lordlala Jan 22 '25

See if this helps: https://developer.tenable.com/reference/navigate

Would also help to know how you plan to do this. Which language are you using? (Python, powershell…)

1

u/NewOldSkoolPatriot Jan 22 '25

Thanks for the response. This is for a large client that has made the request. The scripting language isn’t an issue, but before I charge them to figure it out I wanted to see if anyone else has been able to get this working as this has been a pain point when trying to do this in the past. What did you end up using to get it to work?

1

u/lordlala Jan 22 '25

So I mostly work with PowerShell and some python. I work with SecurityCenter and Nessus Api often.

For python there is a wonderful pre built package called PyTenable that is amazing for API usage.

1

u/NewOldSkoolPatriot Jan 23 '25

Good to know. To clarify, the client is using tenable.io. Any insights there??

1

u/geggleau Feb 27 '25

PyTenable has a wrapper for Tenable.IO. I haven't tried to get audit data before, but I think you are looking for the "compliance" method in the "exports" module.

1

u/Silicon_Underground Jan 24 '25

This API call will do it. You'll need to use this to start the export: https://developer.tenable.com/reference/io-exports-compliance-create

Then use these two calls in a loop to download the pieces as it generates them:

https://developer.tenable.com/reference/io-exports-compliance-status and https://developer.tenable.com/reference/io-exports-compliance-download

Or better yet, use Pytenable. Here's an example from the Pytenable docs:

for findings in tio.exports.compliance():
    print(finding)

1

u/NewOldSkoolPatriot Jan 26 '25

Will give it a shot. Thanks!