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

Resolves #1050 Created new GET /cve_cursor endpoint that implements cursor pagination for getting CVE records #1108

Merged
merged 14 commits into from
Aug 10, 2023

Conversation

jdaigneau5
Copy link
Collaborator

Closes Issues #1050, #972

Summary

Created alternative to GET /cve endpoint that implements mongo cursor pagination. Using cursor pagination, changes to CVE records that occur between paginated calls will not affect the results of each call. Therefore, no records could be missed or duplicated between pages.

Important Changes

cve.controler.js

  • Added new function getFilteredCvesCursor.

baseRepository.js

  • Created cursorPaginate function that implement paginate from mongo-cursor-pagination package

cve.controller/index.js

  • Created new Secretariat and Bulk Download only endpoint, GET /cve_cursor that utilizes getFilteredCvesCursor

Testing

Steps to manually test updated functionality, if possible

  • 1) Example test step.

Notes

  • Some additional notes about this MR.

}
}
*/
mw.validateUser,

Check failure

Code scanning / CodeQL

Missing rate limiting

This route handler performs [authorization](1), but is not rate-limited.
@jdaigneau5 jdaigneau5 changed the title DRAFT: Resolves #1050 Created new GET /cve_cursor endpoint that implements cursor pagination for getting CVE records Resolves #1050 Created new GET /cve_cursor endpoint that implements cursor pagination for getting CVE records Aug 9, 2023
@jdaigneau5 jdaigneau5 requested a review from david-rocca August 9, 2023 19:24
david-rocca
david-rocca previously approved these changes Aug 9, 2023
Copy link
Collaborator

@david-rocca david-rocca left a comment

Choose a reason for hiding this comment

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

As far as I can tell this is running as expected. LGTM

@david-rocca david-rocca merged commit c7ee199 into dev Aug 10, 2023
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