-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
breaking-change(db): separate Nvd and Jvn #192
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MaineK00n
changed the title
[WIP] feat(db): separate Nvd and Jvn
feat(db): separate Nvd and Jvn
Jul 14, 2021
MaineK00n
changed the title
feat(db): separate Nvd and Jvn
[WIP] feat(db): separate Nvd and Jvn
Jul 14, 2021
9 tasks
MaineK00n
changed the title
[WIP] feat(db): separate Nvd and Jvn
feat(db): separate Nvd and Jvn
Jul 23, 2021
kotakanbe
requested changes
Aug 10, 2021
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.
I made a few comments :)
kotakanbe
approved these changes
Aug 13, 2021
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
kotakanbe
changed the title
feat(db): separate Nvd and Jvn
breaking-change(db): separate Nvd and Jvn
Aug 13, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What did you implement:
Since Insert and Search are difficult to use, NVD and JVN are separated and managed separately.
It seems that Nvd used to have XML and JSON, but XML was removed by #147.
Therefore,
NvdJSON
has been changed toNvd
.And, when obtaining CVE information from CpeURI, the source of CVE information from either NVD or JVN CPE is shown in
CveDetail.CveIDSource
.In addition, the following bugs have been fixed by reviewing the DB design.
Fixes #116
This needs to be fixed in Vuls as well.
fix PR: future-architect/vuls#1277
NOTE
In this PR, we are changing the architecture of Redis. Specifically, we have changed Hash to Set. The keys will not be the same, so errors are unlikely to occur, but it is safe to rebuild the DB.
In particular, if you get the following error message, you will need to rebuild the DB.
This PR will change the schema of the RDB.
Therefore, if you try to open the old DB with the new go-cve-dictionary binary, you will get the following error message. In this case, please fetch the new DB with the new go-cve-dictionary.
Type of change
How Has This Been Tested?
Verify that the output between RDB and Redis using server mode in the new binary is equal.
Fixed a bug where CVE-IDs were conflicting and data was missing.
In
upstream/master: RDB
, only the one with"JvnID": "JVNDB-2020-004959"
is displayed, and inupstream/master: Redis
, only the one with"JvnID": "JVNDB-2020-004960"
is displayed. These are conflicting withCVE-2020-11539
, so up to now only the first Insert data was saved in RDB, and only the last Set data was saved in Redis.If
PR
is looked at, it can be seen that both"JvnID": "JVNDB-2020-004959"
and"JvnID": "JVNDB-2020-004960"
can be obtained.In addition, when retrieving CVE information from CpeURI, we used to indicate which CPE the data was obtained from by setting either NVD or JVN to nil.
This PR enables to know which data is obtained from which source by filling
Nvd
andJvn
inCveDetail.CveIDSource
.Thus, it is no longer necessary to nil the JVN data when it is found in either NVD or JVN.
Checklist:
You don't have to satisfy all of the following.
make fmt
make test
Is this ready for review?: YES
Reference