-
Notifications
You must be signed in to change notification settings - Fork 79
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
New xrefs data model #225
New xrefs data model #225
Commits on May 14, 2019
-
Introduce generic vtref struct and use for xref.
This introduces a struct for VT references. The nvti objects is extended to have a list of the vtref objects. Basically the new struct is handled similar to the prefs. Also, the xref element of nvti is removed and the API uses the new list of vtrefs to mimic the previous behaviour. Actually this is transitional until all modules will use the new generic references.
Configuration menu - View commit details
-
Copy full SHA for ee27cb0 - Browse repository at this point
Copy the full SHA ee27cb0View commit details -
Handle BID also via new ref struct.
Also improves the xref handling slightly.
Configuration menu - View commit details
-
Copy full SHA for faec053 - Browse repository at this point
Copy the full SHA faec053View commit details -
Configuration menu - View commit details
-
Copy full SHA for f372e62 - Browse repository at this point
Copy the full SHA f372e62View commit details -
Add vtref protos to header file.
This makes them availble to other modules.
Configuration menu - View commit details
-
Copy full SHA for 515ac3b - Browse repository at this point
Copy the full SHA 515ac3bView commit details -
Add nvti_add_refs_from_csv() to API for bulk refs
This new method allows to add a bulk of comma-separated references to the NVTI. All references share the same type and (optional) text. A typical use case is to add bulk of CVEs.
Configuration menu - View commit details
-
Copy full SHA for 8bcb429 - Browse repository at this point
Copy the full SHA 8bcb429View commit details -
Don't consider NOBID, NOCVE and NOXREF anymore.
These exception are from old OTP times and the keywords should not appear anymore.
Configuration menu - View commit details
-
Copy full SHA for 72bfb37 - Browse repository at this point
Copy the full SHA 72bfb37View commit details -
Call nvti_add_refs_from_csv for bid and cve.
The code in nvti_add_bid and nvti_add_cve is meanwhile redundant with the code in nvti_add_refs_from_csv and thus these methods now simply call the latter. Eventually they can be eliminated once gvmd does not call them anymore. Also occured the need to const'ify vtref_new and nvti_add_refs_from_csv for doing so.
Configuration menu - View commit details
-
Copy full SHA for 23766ee - Browse repository at this point
Copy the full SHA 23766eeView commit details -
Use nvti_add_refs_from_csv instead of nvti_set_cve.
And use nvti_add_refs_from_csv instead of nvti_set_bid.
Configuration menu - View commit details
-
Copy full SHA for 374adff - Browse repository at this point
Copy the full SHA 374adffView commit details -
Remove now unused functions for bid and cve.
This removes nvti_set_cve(), nvti_set_bid(), nvti_add_cve() and nvti_add_bid().
Configuration menu - View commit details
-
Copy full SHA for 700cad7 - Browse repository at this point
Copy the full SHA 700cad7View commit details -
New nvti_ref() replaces nvt_bid() and nvti_cve().
One thing that needs to be considered when changing this in modules using this function is to free the returned string.
Configuration menu - View commit details
-
Copy full SHA for eb48d0f - Browse repository at this point
Copy the full SHA eb48d0fView commit details -
Extend nvti_refs() to replace nvti_xref().
This enables nvti_ref() to exclude types and to use either simple CVS or a CSV that includes the type of each reference.
Configuration menu - View commit details
-
Copy full SHA for ade3307 - Browse repository at this point
Copy the full SHA ade3307View commit details -
Extend nvti_add_refs_from_csvs.
This allows to remove nvti_set_xref.
Configuration menu - View commit details
-
Copy full SHA for e834a1c - Browse repository at this point
Copy the full SHA e834a1cView commit details -
Rename nvti_add_refs_from_csv to nvti_add_refs.
This makes the naming consistent with other functions.
Configuration menu - View commit details
-
Copy full SHA for ff3831b - Browse repository at this point
Copy the full SHA ff3831bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d4df60 - Browse repository at this point
Copy the full SHA 2d4df60View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46824a2 - Browse repository at this point
Copy the full SHA 46824a2View commit details -
Change CSV syntax by adding a space.
For compatibility reason the CSV is using ", " instead of just ",". This is the syntax used before and other tools using the redis-database directly rely on this syntax.
Configuration menu - View commit details
-
Copy full SHA for 17f4eaa - Browse repository at this point
Copy the full SHA 17f4eaaView commit details -
Add vtref_*(), and nvti_ref*() functions.
This add vref_type(), vtref_id(), nvt_ref() and nvt_ref_len() to the API. These functions allow to work with the actual reference object rather than with the serialized strings. The names are choosen to be consistent with the prefs handling.
Configuration menu - View commit details
-
Copy full SHA for 4ef1e3f - Browse repository at this point
Copy the full SHA 4ef1e3fView commit details -
This reduces the number of code lines slightly for the g_strsplit loops. Also adding missing free's for the newly allocated split strings.
Configuration menu - View commit details
-
Copy full SHA for 8ea2c51 - Browse repository at this point
Copy the full SHA 8ea2c51View commit details -
Move vtref struct out of public interface.
Since the element of the struct should not be used by other than the internal functions, move the struct out of the header file into the module.
Configuration menu - View commit details
-
Copy full SHA for 9adc3cb - Browse repository at this point
Copy the full SHA 9adc3cbView commit details -
Rename nvti_add_ref() to nvti_add_vtref().
This renaming is for consistent naming scheme.
Configuration menu - View commit details
-
Copy full SHA for d42fe16 - Browse repository at this point
Copy the full SHA d42fe16View commit details -
The function g_malloc0() already does the check.
Configuration menu - View commit details
-
Copy full SHA for 3cbc36c - Browse repository at this point
Copy the full SHA 3cbc36cView commit details -
Removed the "A copy will be created" notes from the doc-string where const is used anyway.
Configuration menu - View commit details
-
Copy full SHA for 6b75dde - Browse repository at this point
Copy the full SHA 6b75ddeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 05aecb0 - Browse repository at this point
Copy the full SHA 05aecb0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a45e7d - Browse repository at this point
Copy the full SHA 2a45e7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for b765fab - Browse repository at this point
Copy the full SHA b765fabView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20f0a3e - Browse repository at this point
Copy the full SHA 20f0a3eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f26dbe9 - Browse repository at this point
Copy the full SHA f26dbe9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 911003b - Browse repository at this point
Copy the full SHA 911003bView commit details -
The split was done for every refrence for the very same string. Now it is done only once.
Configuration menu - View commit details
-
Copy full SHA for fd356c5 - Browse repository at this point
Copy the full SHA fd356c5View commit details -
Constify where return object should not be free'd.
Also fix a confusion about renaming function nvti_add_vtref.
Configuration menu - View commit details
-
Copy full SHA for 092430a - Browse repository at this point
Copy the full SHA 092430aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b4b969 - Browse repository at this point
Copy the full SHA 2b4b969View commit details
Commits on May 15, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 91a2e83 - Browse repository at this point
Copy the full SHA 91a2e83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60af703 - Browse repository at this point
Copy the full SHA 60af703View commit details