Skip to content

docs: add NVD API 2.0 compatibility examples and tests - #214

Merged
alex-vulncheck merged 7 commits into
mainfrom
4164-nvd-compat-examples
Oct 13, 2026
Merged

alex-vulncheck merged 7 commits into
mainfrom
4164-nvd-compat-examples

Conversation

@alex-vulncheck

@alex-vulncheck alex-vulncheck commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Documents and tests the NvdApi client added in 0.1.4. It covers the NVD API 2.0 compatible endpoints under /rest/json, which work with any VulnCheck API token, including community.

Changes

  • tests/nvd.py / tests/nvd_aio.py: sync and async examples that look up CVE-2021-44228, then page through a one-day last_mod range with cursor. Sending an empty cursor opts in, and the loop stops when next_cursor is None.
  • README: a new "NVD API 2.0 compatibility" section with a contents entry and the async version in a <details> block, regenerated with cog. The README diff only adds lines.
  • tests/integration_test.py: tests for all five endpoints plus a two-page cursor walk.
  • tests/integration_aio.py: the same checks for the async client, added to its main().
  • tests/readme_examples_test.py: runs both new examples.

There are no changes under vulncheck_sdk/, so merging this doesn't trigger a release.

Testing (against api.vulncheck.com)

  • pytest tests/: 44 passed, including the 6 new NVD tests, both new examples, and the async integration suite run via the example harness.
  • make lint: the flake8 error check is clean.

@alex-vulncheck
alex-vulncheck requested a review from a team as a code owner October 13, 2026 09:48
Covers the NvdApi client added in 0.1.4: a README section with sync and async
examples that look up a CVE and page through a date range with cursor, plus
sync and async integration tests for all five endpoints and the cursor walk.
@alex-vulncheck
alex-vulncheck force-pushed the 4164-nvd-compat-examples branch from 3639abb to 4e1de3c Compare October 13, 2026 09:50
@alex-vulncheck alex-vulncheck self-assigned this Oct 13, 2026
Comment thread tests/nvd.py Outdated
Comment thread tests/nvd_aio.py Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread tests/integration_aio.py Outdated
Comment thread tests/integration_aio.py
robc-vulncheck
robc-vulncheck previously approved these changes Oct 13, 2026

@robc-vulncheck robc-vulncheck left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved, just a few minor suggestions above, mainly to match the go sdk

Co-authored-by: robc-vulncheck <309769615+robc-vulncheck@users.noreply.github.com>
alex-vulncheck and others added 5 commits October 13, 2026 12:05
Co-authored-by: robc-vulncheck <309769615+robc-vulncheck@users.noreply.github.com>
Co-authored-by: robc-vulncheck <309769615+robc-vulncheck@users.noreply.github.com>
Co-authored-by: robc-vulncheck <309769615+robc-vulncheck@users.noreply.github.com>
Co-authored-by: robc-vulncheck <309769615+robc-vulncheck@users.noreply.github.com>
Co-authored-by: robc-vulncheck <309769615+robc-vulncheck@users.noreply.github.com>
@alex-vulncheck
alex-vulncheck enabled auto-merge (squash) October 13, 2026 11:06
@alex-vulncheck
alex-vulncheck merged commit 960b052 into main Oct 13, 2026
4 checks passed
@alex-vulncheck
alex-vulncheck deleted the 4164-nvd-compat-examples branch October 13, 2026 11:17
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