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

Fix report cves #1673

Merged
merged 42 commits into from
Oct 9, 2019
Merged

Fix report cves #1673

merged 42 commits into from
Oct 9, 2019

Conversation

bjoernricks
Copy link
Contributor

@bjoernricks bjoernricks commented Oct 8, 2019

Checklist:

When creating a ReportCve instance ensure that the used variables are
always defined.
Use App.fromElement for parsing an App from a Report. Update properties
of App to use consistent naming.
Use consistent naming for high results.
Use fromElement to parse a Report Host model.
Move initialization of values to the constructor and use camel case for
hosts by ip property.
Init hosts in constructor. Use camel case for host by id property.
Rename addSeverity to setSeverity and use new parser functions.
Use new functions for parsing. Init hosts in constructor. Use camel case
for host by ip information. Update setSeverity method.
Report TLS Certificates are a very special "model". It acts very
differently to the normal models because it is not generated from an xml
response element. It's data is collected from several host information
elements.
Update the setProperties function to allow overriding properties of the
object.
Use the fromElement static function to create new models to spot
possible side effects from running the parsing code.
Fix setSeverity method or Port by allowing to override all parsed
properties of the Model. The severity prop was parsed from the passed
element and therefore has been freezed.
Use ReportHosts.fromElement method to parse hosts and add test for
parsing an empty hosts list.
Use ReportPort.fromElement method to parse ports of a report and add
tests for parsing these ports.
Use fromElement to parse vulns from a report and add tests.
Use ReportApp fromElement to parse new app models and add tests for
parseApp.
Use ReportOperatingSystem fromElement method and add tests.
Add fromElement and parseElement methods to ReportTlsCertificate model.
Use constructor only to init the ports property.
Put the parsed port into the array of ports instead of the original one.
Use new fromElement method and add tests.
Don't parse report vulnerabilities of a report anymore. Remove unused
sort functions for reports vulnerabilities.
Drop the unused report vulnerability parsing code.
Info responses are again special because they return e.g.
<get_info_response><info><nvt>. Therefore the nvt model supports parsing
from a nvt sub element too.
Simplify parsing nvt references by adding generic parsing functions.
The nvts got changed to collect all references in a separate refs
element a while ago. The report data parsing code wasn't updated
accordingly.
Copy name from the parsed nvt to the Report Cve model.
The cve page doesn't list each distinct cve. Instead it groups the cves
found in a nvts. Therefore is more a list of cves per nvt instead of a
list of cves. The severity also doesn't display the severity of the cves
instead it displayes the severity of the result which is indeed the
highest severity of found cves.
@bjoernricks bjoernricks changed the base branch from master to gsa-9.0 October 8, 2019 14:43
@bjoernricks bjoernricks marked this pull request as ready for review October 8, 2019 14:46
@@ -89,6 +103,11 @@ const Row = ({entity}) => {
))}
</Divider>
</TableData>
<TableData>
<DetailsLink type="nvt" id={id} title={nvtName}>
{shorten(nvtName, 80)}
Copy link
Member

Choose a reason for hiding this comment

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

What happens if the windows gets smaller? Would it be necessary to add line-breaking here, although it might look ok in "full-screen"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Shouldn't it break automatically? IMHO it only doesn't break if we use css to forbid that.

Copy link
Member

@swaterkamp swaterkamp left a comment

Choose a reason for hiding this comment

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

In case my comment is "rejected", here is the approval, as the PR looks good to me.

@bjoernricks bjoernricks merged commit cebc29b into greenbone:gsa-9.0 Oct 9, 2019
@bjoernricks bjoernricks deleted the fix-report-cves branch October 9, 2019 06:20
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