Fixed bug caused by a host with missing attributes. - #5
Merged
Script-Nomad merged 2 commits intoOct 3, 2019
Merged
Conversation
bmx0r
approved these changes
Sep 2, 2019
bmx0r
commented
Sep 18, 2019
Owner
did you try to merge it yourself? |
bmx0r
commented
Sep 18, 2019
Owner
If you want it to be deploy on pipy, you need to update the version number and tag the commit |
Script-Nomad
commented
Sep 25, 2019
CollaboratorAuthor
I did attempt to, I don't have write access |
This file contains hidden or 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
Sign up for freeto 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.
In certain cases, Nessus scans which contain hosts with no information other than Nessus Configuration settings. These settings appear as "Info" vulnerability objects with no attributes, which results in a MissingAttribute exception. Ordinarily, this is handled by
cls.parsehost(), but in cases where a host does not contain any vulnerabilities which supply all necessary attributes, the exception is raised regardless. Annoyingly, this caused the parser to break. 😐I added an try/except clause to handle this issue when host findings are missing required attributes and throw out the result unless strict parsing is enabled. This is not ideal, but it would be better to accept all known good hosts and throw out any anomalies rather than forcing the parser to bail out unless that is what the user wants (ie: via strict parsing).
This is a temporary fix until we can add better handling of these rogue Nessus configuration setting objects. Ultimately, the solution may be to remove this exception altogether and simply allow a greedy ingestion of all of these nessus objects, and to no longer require certain attributes. 😕
P.S. Also fixed one of my earliest mistakes when implementing the report logger. Forgot to issue it a name, which created a copy of the class instead of an instance of it. Whoops. 😅