-
Notifications
You must be signed in to change notification settings - Fork 158
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
GMP: Consolidate NVT references into unified "refs" element #427
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
janowagner
added
the
work in progress
This pull request should not be merged yet, more commits are expected
label
Mar 16, 2019
janowagner
force-pushed
the
work
branch
2 times, most recently
from
March 31, 2019 19:31
e065583
to
bfb9d2c
Compare
janowagner
removed
the
work in progress
This pull request should not be merged yet, more commits are expected
label
Apr 11, 2019
mattmundell
requested changes
Apr 18, 2019
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.
Good change this.
Really great how the PR is broken down step by step.
janowagner
force-pushed
the
work
branch
2 times, most recently
from
April 25, 2019 18:28
e76081e
to
1f1de66
Compare
This applies for the get_info response for an NVT. It is the first step to consolidate all of the references into the single element "refs". The reference types are lower-cased now: CERT-Bund becomes cert-bund and DFN-CERT becomes dfn-cert.
The cert references are turned into the general references element. The type is lower-cased. The element of cert are renamed from cert_ref to just ref. This makes the cert references in line with the response of get_nvts.
Call new section "References" because eventually all of them will be in "refs".
Also surpress NOBID as it makes no sense anymore in refs.
The type from xref is directly applied as type for ref 1:1. Also, NOXREF will not appear anymore.
This adds the consolidation of cve, bid and xref into refs for the two commands.
This move the xml creation part out of the results iterator in order to make it accesible to other functions. This generalizes on oid, so you neither need a iterator nor a nvti object. This prepares ground to use the same xml assembly routine also for get_nvts.
This is for the get_nvts command.
We do not need them anymore and eventually the references will be managed with a different data model anyway.
This involves a slight change of the CSV format: The columns for CVEs, BIDs, CERTs and Other References used a comma as a separator inside the cell, Not instead of a comma a newline is used as a separator. The comma was a left-over convenience from the old references format.
This converts the CVE list of a ovaldef into the new refs format.
This change establishes the previous behaviour.
mattmundell
approved these changes
Apr 28, 2019
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.
The GMP element "nvt" uses various explicit elements for references: "bid", "cve", "xrefs" and "cert".
This is all consolidated into a "refs" section like this:
This affects the commands get_nvts, get_results, get_info and get_reports.