Repository navigation
Translated the removed vpr_v2_score export filter to vpr_score - #1055
Merged
Merged
Conversation
…5401) Tenable removed the vpr_v2_score filter from the vulnerability and WAS export APIs on 2026-10-01, as announced in the 2026-09-10 changelog "Final Reminder: vpr_v2 Fields Removed from Exports on October 1". The API now rejects it with 400 BAD_REQUEST_UNKNOWN_PROPERTY, but exports.vulns() and exports.was() still sent it. vpr_score now uses the same VPR v2 model, so the vpr_v2_score argument is kept for backward compatibility: its value is sent as vpr_score and a DeprecationWarning is emitted. Passing both raises UnexpectedValueError. The export filter models translate it the same way, because they ignore unknown fields and would otherwise drop the filter silently.
Resolved the conflict in tests/io/exports/test_api.py, where this branch's vpr_v2_score tests and tenable#1051's cve_id tests were both appended at the end of the file. Both sets are kept.
Member
Author
|
Resolved the merge conflict in the tests. |
SteveMcGrath
requested changes
Nov 6, 2026
SteveMcGrath
approved these changes
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Tenable removed the
vpr_v2_scorefilter from the vulnerability and Web App Scanning export APIs on 2026-10-01.tio.exports.vulns(vpr_v2_score=...)andtio.exports.was(vpr_v2_score=...)still sent it, so every export that used it failed with400 BAD_REQUEST_UNKNOWN_PROPERTY.Evidence:
vpr_v2_scorewill be deprecated. Usevpr_score, which reflects the updated VPR model from July 1, 2026.vpr_v2_scoreandplugin.vpr_v2are removed from both exports on 2026-10-01, andvpr_scorereflects the enhanced VPR model.vpr_v2_score, and they carry a caution note that it was removed.vpr_v2_scorereturns400 BAD_REQUEST_UNKNOWN_PROPERTYon both exports, andvpr_scoreis accepted.The fix: translate and warn.
vpr_scorenow uses the same VPR v2 model, so thevpr_v2_scoreargument is kept, and existing scripts keep working:exports.vulns()andexports.was()send avpr_v2_scorevalue asvpr_score, with a warning that says to usevpr_scoreand thatvpr_v2_scorewill be removed from pyTenable in the 2027.03 releases.stacklevel=2points the warning at the caller.vpr_scoreandvpr_v2_scoretogether raisesValueErrorbefore any request is sent.vpr_v2_scorefield is removed fromVulnerabilityExportFiltersV1andWASExportFiltersV1. The translation happens in the two methods.vpr_v2_scoreas deprecated, with its removal release. Before, it wasn't documented at all.Calls without
vpr_v2_scoresend exactly the same request as before. No new dependencies.CHANGELOG.mdandtenable/version.pyare untouched.Release note:
exports.vulns()andexports.was()now send avpr_v2_scorefilter asvpr_score, with a warning, because Tenable removedvpr_v2_scorefrom the export APIs on 2026-10-01.Fixes #1054
Internal tracking: RDC-25401.
Type of change
Passing both
vpr_scoreandvpr_v2_scorenow raises locally. Before, the API rejected that request with400anyway, so this isn't a breaking change.How Has This Been Tested?
Unit tests. They use
responsesand assert the request body.exports.vulns(vpr_v2_score=...)andexports.was(vpr_v2_score=...)emit the deprecation warning and sendfilters.vpr_score, with novpr_v2_scorekey.vpr_score:exports.vulns(vpr_score=...)emits no warning. The test treats any warning as an error.ValueErrorwith no request sent, for both methods.main: all 4 new tests forvpr_v2_scorefail againstmain. Thevpr_score-only test passes there too, as expected.ruff check tenableis clean, andruff formatreports no changes inexports/api.pyorexports/models.py. The full suite passes on 3.11, 3.12, 3.13 and 3.14: 2303 passed, 0 failed, 95.6–95.8% coverage.bandit -llresults are unchanged frommain.main(the same 6 warnings), and the deprecated argument renders in both docstrings.Live API tests. These ran against three Tenable Vulnerability Management test environments, using small export jobs cleaned up afterward. All 10 checks passed in each environment. After the review changes, the vulnerability and WAS checks were repeated in one environment: both exports finished, the status echoed
vpr_score, and each call emitted one warning.vpr_v2_score, both export types were accepted and finished.vpr_score, notvpr_v2_score.vpr_scoreexport (13, 149 and 1,439 vulnerability findings; 5, 0 and 22 WAS findings).Test Configuration:
Checklist: