docs(vulnerability-reporting): document the per-CVE listing total - #337
Open
maximelb wants to merge 1 commit into
Open
docs(vulnerability-reporting): document the per-CVE listing total#337maximelb wants to merge 1 commit into
total#337maximelb wants to merge 1 commit into
Conversation
`query_cve_vuln_hosts` had no documented response, and `total` on it and on `query_cve_vuln_packages` is easy to misread: it counts the whole result set, not the rows in the page you are holding, and it is only returned on the first page. Adds the response example plus the three things a paging caller has to know: `total` is first-page-only, it is omitted when a per-page filter means no count could be accurate, and an empty `hosts` array with a live `cursor` is a legitimate mid-listing page — so `cursor`, never `total` or row count, is what says the listing is finished. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J1XzAUsz12jPUhfofUja5M
lcbill
approved these changes
Aug 8, 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.
query_cve_vuln_hostshad no documented response at all, andtotalon it and onquery_cve_vuln_packagesis easy to misread — it counts the whole result set, not the rows in the page you are holding, and it is only returned on the first page.Adds the response example plus the three things a paging caller actually has to know:
totalis first-page-only (the request that omitscursor); later pages omit the field.criticality/env/exposure/resolutionfilter, because those are applied per page and no total would be accurate. A missingtotalmeans "not available", not zero.hostsarray with a non-emptycursoris a legitimate mid-listing page under those filters — socursor, nevertotalor the row count, is what tells you the listing is finished.Docs-only; no code in this repo.
🤖 Generated with Claude Code
https://claude.ai/code/session_01J1XzAUsz12jPUhfofUja5M