Skip to content

[feature/VM-7371] - Attack path export new public api#982

Open
noa224011 wants to merge 6 commits intotenable:mainfrom
noa224011:feature/VM-7371-attack-path-export
Open

[feature/VM-7371] - Attack path export new public api#982
noa224011 wants to merge 6 commits intotenable:mainfrom
noa224011:feature/VM-7371-attack-path-export

Conversation

@noa224011
Copy link
Contributor

@noa224011 noa224011 commented Mar 15, 2026

Description

Adds a new Export API module to the TenableOne Attack Path SDK, enabling users to export attack paths and attack techniques data.

  • POST /api/v1/t1/apa/export/attack-path — Export top attack paths (vectors)
  • POST /api/v1/t1/apa/export/attack-technique — Export attack techniques
  • GET /api/v1/t1/apa/export/{export_id}/status — Get export status
  • GET /api/v1/t1/apa/export/{export_id}/download — Download export results

Usage

from tenable.tenableone import TenableOne                                                                            
  from tenable.tenableone.attack_path.export.schema import (                                                           
      AttackPathExportType, FileFormat, AttackPathColumnKey                                                            
  )                                                                                                                    
                                                                                                                       
  t1 = TenableOne(access_key='XXX', secret_key='XXX')                                                                  
                                                                                                                       
  # Request an export                                                                                                  
  export = t1.attack_path.export.attack_paths(              
      export_type=AttackPathExportType.VECTORS,                                                                        
      file_format=FileFormat.CSV,                                                                                      
      columns=[AttackPathColumnKey.PATH_NAME, AttackPathColumnKey.PRIORITY],                                           
  )                                                                                                                    
                                                                                                                       
  # Check status                                                                                                       
  status = t1.attack_path.export.status(export.export_id)                                                              
                                                                                                                       
  # Download when ready                                                                                                
  data = t1.attack_path.export.download(export.export_id)

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • Python Version(s) Tested:
  • Tenable.sc version (if necessary):

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@noa224011 noa224011 requested a review from a team as a code owner March 15, 2026 14:32
@SteveMcGrath
Copy link
Contributor

You need to add the appropriate stubs for the documentation generation to work. Currently the net-new module isn't generating the appropriate docs.

https://pytenable--982.org.readthedocs.build/en/982/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants