-
Notifications
You must be signed in to change notification settings - Fork 57
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
2521 Refactor CVE and Product Info Tables #2526
2521 Refactor CVE and Product Info Tables #2526
Conversation
…tency; update associated endpoints, tests, and API calls; remove redundant cpe_list column.
…tor-cve-and-product_info-tables
This is difficult to test due to issues calling the PE API today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far after rebuilding the app from scratch, but won't be able to properly review until after the P&E API is working again and I can get some data in with cveSync.
…tor-cve-and-product_info-tables
Pull request was converted to draft
…Db method; separate leftJoinAndSelect() and where() methods to restore cpe/cve endpoint functionality.
I've updated syncdb's populate method to include the cve and cpe tables to assist local development. To this PR's changes:
|
….onConflict method so that modifiedAt field isn't overwritten with current time, and add skipUpdateIdNotValuesChanged property to reduce inserts. Add optional parameters to CveEntry interface to match response schema from PE endpoint. Add CVE name to console logs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, confirmed that test data, cveSync, and vulnerability details page all works/loads correctly
…ishedAt/modifiedAt columns nullable to match PE API. Minor formating and refactoring.
…ishedAt/modifiedAt columns nullable to match PE API. Minor formating and refactoring.
…m:cisagov/crossfeed into 2521-refactor-cve-and-product_info-tables
🗣 Description
💭 Motivation and context
We recently added two tables, cve and product_info. The column names follow a different naming convention than the rest of the codebase. For one thing they use snake case instead of camel case. This makes our API inconsistent and adds confusion to frontend development.
I renamed the product_info table to cpe so that references to entries are more informative: cpe = single entry and cpes is a collection of entries. This isn't the case now with product_info being used as both singular and plural.
I also removed the cpe_list column since there is already a join table between cves and cpes coded into the db model.
Closes issue #2534
Closes issue #2521
🧪 Testing
Modified tests for API functionality. Manually tested Vulnerability Details page.
✅ Pre-approval checklist
in code comments.
to reflect the changes in this PR.
✅ Pre-merge checklist
✅ Post-merge checklist