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

Make several NVTI tags internally explicit. #719

Merged
merged 10 commits into from
Aug 28, 2019

Conversation

janowagner
Copy link
Member

This change makes the elements "summary", "insight", "detection", "impact" and "affected" explicit columns of the table "nvts".

These elements are already explicit in the vt object incoming via OSP.

For keeping GMP API compatibility, the 5 elements are serialized into the "tag" string.

The API is not modified, the changes are only internally.

This PR requires greenbone/gvm-libs#258

Checklist:

Copy link
Contributor

@mattmundell mattmundell left a comment

Choose a reason for hiding this comment

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

Looks fine, just two small formatting changes.

src/manage_sql_nvts.c Outdated Show resolved Hide resolved
src/manage_sql_nvts.c Outdated Show resolved Hide resolved
src/manage_sql_nvts.c Outdated Show resolved Hide resolved
src/manage_sql_nvts.c Outdated Show resolved Hide resolved
These new iterstors are for the new explciit nvt elements
"summary", "insight", "affected", "impact" and "detection".

These are implemented analog to the existing ones.
Since these elements do not appear anymore in the internal tag string
they need to be appended in order to keep API compatibility.
For compatibility add the now-expclicit elements to the tag string.
The new elements need to be added for the case when the
table "nvts" is created anew.
Internally in the data model in table nvts several
elements are now handled explicitely instead of
being stored in the "tag" string.

When reading them from OSP (where they are already explciit elements)
they are not anymore serialized into the tag string. They are rather
directly stored into the extended nvti structure.

While doing so also a bug is fixed because "impact" was missing when
parsing OSP VT information.
@mattmundell mattmundell merged commit 6104903 into greenbone:master Aug 28, 2019
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