Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add: Support for NIST NVD CVE Change History API #920

Merged
merged 23 commits into from
Nov 10, 2023

Conversation

n-thumann
Copy link
Member

@n-thumann n-thumann commented Nov 3, 2023

What

This PR adds support for NIST NVD CVE Change History API (see https://nvd.nist.gov/developers/vulnerabilities#divGetCveHistory).

Why

To query for changes of CVEs.

Notes:
https://csrc.nist.gov/schema/nvd/api/2.0/cve_history_api_json_2.0.schema specifies the eventName to be a string and not an Enum with predefined values. https://nvd.nist.gov/developers/vulnerabilities#cveHistory-eventName however specifies specific values, so I used an Enum anyways.

References

VTA-463

Checklist

  • Tests

Copy link

github-actions bot commented Nov 3, 2023

Conventional Commits Report

Type Number
Bug Fixes 7
Changed 10
Removed 2
Added 4

🚀 Conventional commits found.

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

Merging #920 (499612b) into main (a56d0d5) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #920      +/-   ##
==========================================
+ Coverage   90.32%   90.43%   +0.11%     
==========================================
  Files          95       97       +2     
  Lines        6666     6745      +79     
  Branches      957      968      +11     
==========================================
+ Hits         6021     6100      +79     
  Misses        441      441              
  Partials      204      204              
Files Coverage Δ
pontos/nvd/cve_changes/api.py 100.00% <100.00%> (ø)
pontos/nvd/models/cve_change.py 100.00% <100.00%> (ø)

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@n-thumann n-thumann marked this pull request as ready for review November 8, 2023 15:30
@n-thumann n-thumann requested a review from a team as a code owner November 8, 2023 15:30
@greenbonebot greenbonebot enabled auto-merge (rebase) November 8, 2023 15:39
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

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

Looks very good already. Could you do me an additional favor and implement the changes from #919 where i've added requesting a specific number of results? Should be straight forward.

pontos/nvd/cve_change_history/__init__.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pontos/nvd/cve_change_history/api.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
n-thumann and others added 2 commits November 10, 2023 10:38
Co-authored-by: Björn Ricks <bjoern.ricks@greenbone.net>
@greenbonebot greenbonebot merged commit fe6835f into main Nov 10, 2023
21 checks passed
@greenbonebot greenbonebot deleted the add_cve_change_history_api branch November 10, 2023 10:19
@n-thumann n-thumann mentioned this pull request Nov 14, 2023
1 task
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.

None yet

3 participants