Skip to content

docs(vulnerability-reporting): document the per-CVE listing total - #337

Open
maximelb wants to merge 1 commit into
masterfrom
docs/cve-listing-total-semantics
Open

docs(vulnerability-reporting): document the per-CVE listing total#337
maximelb wants to merge 1 commit into
masterfrom
docs/cve-listing-total-semantics

Conversation

@maximelb

@maximelb maximelb commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

query_cve_vuln_hosts had no documented response at all, 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 actually has to know:

  • total is first-page-only (the request that omits cursor); later pages omit the field.
  • It is omitted when the request carries a criticality / env / exposure / resolution filter, because those are applied per page and no total would be accurate. A missing total means "not available", not zero.
  • An empty hosts array with a non-empty cursor is a legitimate mid-listing page under those filters — so cursor, never total or 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

`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
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