Skip to content

Add Findings and Policy Findings API modules for Tenable OT Security#981

Open
ThisTooShallXSS wants to merge 1 commit intotenable:mainfrom
ThisTooShallXSS:feature/ot-findings-api
Open

Add Findings and Policy Findings API modules for Tenable OT Security#981
ThisTooShallXSS wants to merge 1 commit intotenable:mainfrom
ThisTooShallXSS:feature/ot-findings-api

Conversation

@ThisTooShallXSS
Copy link
Contributor

Description

Implements comprehensive API support for managing security findings and policy compliance findings in OT environments.

Type of change

New API Modules:

  • FindingsAPI: Manages vulnerability findings detected on assets, including list operations with GraphQL support, filtering, sorting, and pagination
  • PolicyFindingsAPI: Manages policy violation and compliance findings with similar query capabilities

Schema Definitions:

  • Created Pydantic schemas for data validation (findings.py, policy_findings.py)
  • Added GraphQL schema definitions for both findings types
  • Integrated comprehensive field mappings for asset details, plugin information, detection metadata, and status tracking

GraphQL Integration:

  • Extended query.py with FINDINGS_QUERY and POLICY_FINDINGS_QUERY
  • Implemented OTGraphIterator support for efficient pagination
  • Added support for complex filtering, sorting, and search capabilities

Testing:

  • Comprehensive test coverage for both API modules (774 total test lines)
  • Tests cover list operations, filtering, pagination, error handling, and schema validation

Updated session.py to register new API endpoints and init.py to export new modules.

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Test Configuration:

  • Python Version(s) Tested: 3.14.3

Implements comprehensive API support for managing security findings and policy compliance findings in OT environments.

New API Modules:
- FindingsAPI: Manages vulnerability findings detected on assets, including list operations with GraphQL support, filtering, sorting, and pagination
- PolicyFindingsAPI: Manages policy violation and compliance findings with similar query capabilities

Schema Definitions:
- Created Pydantic schemas for data validation (findings.py, policy_findings.py)
- Added GraphQL schema definitions for both findings types
- Integrated comprehensive field mappings for asset details, plugin information, detection metadata, and status tracking

GraphQL Integration:
- Extended query.py with FINDINGS_QUERY and POLICY_FINDINGS_QUERY
- Implemented OTGraphIterator support for efficient pagination
- Added support for complex filtering, sorting, and search capabilities

Testing:
- Comprehensive test coverage for both API modules (774 total test lines)
- Tests cover list operations, filtering, pagination, error handling, and schema validation

Updated session.py to register new API endpoints and __init__.py to export new modules.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@ThisTooShallXSS ThisTooShallXSS requested a review from a team as a code owner March 4, 2026 23:19
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.

1 participant