-
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
Report model parsing updates #1668
Merged
bjoernricks
merged 33 commits into
greenbone:gsa-8.0
from
bjoernricks:report-model-parsing-updates
Oct 7, 2019
Merged
Report model parsing updates #1668
bjoernricks
merged 33 commits into
greenbone:gsa-8.0
from
bjoernricks:report-model-parsing-updates
Oct 7, 2019
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
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.
Codecov Report
@@ Coverage Diff @@
## gsa-8.0 #1668 +/- ##
===========================================
+ Coverage 37.64% 39.11% +1.46%
===========================================
Files 966 965 -1
Lines 22116 22081 -35
Branches 6212 6231 +19
===========================================
+ Hits 8326 8637 +311
+ Misses 12465 12176 -289
+ Partials 1325 1268 -57
Continue to review full report at Codecov.
|
swaterkamp
approved these changes
Oct 7, 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.
Checklist: