-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix report cves #1673
Conversation
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.
Report model parsing updates
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.
@@ -89,6 +103,11 @@ const Row = ({entity}) => { | |||
))} | |||
</Divider> | |||
</TableData> | |||
<TableData> | |||
<DetailsLink type="nvt" id={id} title={nvtName}> | |||
{shorten(nvtName, 80)} |
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.
What happens if the windows gets smaller? Would it be necessary to add line-breaking here, although it might look ok in "full-screen"?
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.
Shouldn't it break automatically? IMHO it only doesn't break if we use css to forbid that.
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.
In case my comment is "rejected", here is the approval, as the PR looks good to me.
Checklist: