Skip to content

Add Recast Rules API support - #1024

Open
rksharma-owg wants to merge 1 commit into
tenable:mainfrom
rksharma-owg:feat/recast-rules-api
Open

rksharma-owg wants to merge 1 commit into
tenable:mainfrom
rksharma-owg:feat/recast-rules-api

Conversation

@rksharma-owg

Copy link
Copy Markdown

Description

This adds a tio.recast_rules interface for the Tenable Vulnerability Management Recast Rules API. The interface supports creating, searching, retrieving, updating, and deleting rules, along with listing the available rule filters. It validates documented resource types, UUIDs, payload types, and the search limit while passing API-defined filter and sort objects through unchanged.

The new interface is included in the generated API documentation. No dependencies are required.

Fixes #967

Type of change

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

How Has This Been Tested?

Request-level tests exercise all six endpoints without live credentials and assert HTTP methods, paths, JSON payloads, response handling, and invalid resource-type/limit behavior.

  • Focused tests: uv run --python 3.12 --isolated --group dev pytest -q tests/io/test_recast_rules.py (4 passed)
  • Full local suite: 2,120 passed, 34 skipped, 6 xfailed, 3 xpassed; 95.51% coverage
  • Ruff: uv run --python 3.12 --isolated --group dev ruff check tenable
  • Strict documentation build: uv run --python 3.12 --isolated --group docs sphinx-build -W -b html docs /tmp/pytenable-docs-recast
  • Fork preflight: Python 3.11, 3.12, 3.13, and 3.14 lint/tests/coverage plus code audit (run)

Test Configuration:

  • Python Version(s) Tested: 3.11, 3.12, 3.13, 3.14 on Ubuntu; 3.12.13 on macOS
  • Tenable.sc version (if necessary): N/A

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 where behavior is not self-explanatory
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove the feature works
  • New and existing unit tests pass locally with my changes

@rksharma-owg
rksharma-owg requested a review from a team as a code owner September 20, 2026 01:42
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.

Add support for the new Recast Rules API

1 participant