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

count of affected hosts in summary does not match with real count of hosts #1

Closed
4thomasmueller opened this issue Jun 25, 2019 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@4thomasmueller
Copy link

As suggested, i'm reopening the issue here.
Hello,

we did scan 2 (two) hosts and we've got a total amount of 18 affected hosts in summary page.
we are creating the report as described (python3 -m openvasreporting -i <report.xml> -o <report.xlsx>)
Is this an expected behaviour?

Regards Thomas
hosts

@TheGroundZero
Copy link
Owner

I may need to change the wording on this one.

As you can see in your example, 1 "Low" vulnerability was discovered on both hosts.
Same for the Information/None findings, of which there are 8 unique ones that are discovered on both systems.
I can see how summing this all makes the results look off.

Would you agree with me naming this "instances" or "# discovered"?

It shouldn't be too hard to make a column that shows unique affected hosts (i.e. 2 Low and 2 None, without total, in your case).
I'll try to free up some time to get this fixed.

@TheGroundZero
Copy link
Owner

How about something like this?

Threat Unique Vulns Hosts affected # Discovered
Critical 0 0 0
High 0 0 0
Medium 0 0 0
Low 1 2 2
None 8 2 16
Total 9 18

Total hosts affected may be doable, will have to check the data from the report.
I.e. you may have a vuln affected host A & B, and one affecting B & C, so total hosts affected = 3 with total vulns = 2

@4thomasmueller
Copy link
Author

It looks better and might be less confusion for the customer.

Thanks and regards, Thomas

@TheGroundZero TheGroundZero added the enhancement New feature or request label Jun 28, 2019
@TheGroundZero TheGroundZero self-assigned this Jun 28, 2019
@ididwhat
Copy link
Contributor

ididwhat commented Nov 8, 2019

Hi there

new to Github and Python so please bear with me

I have made some minor changes that now only count unique hosts per level. i.e if 3 critical vulns are found on 1 host it reports 1 and not 3. and so on. thus reflecting the number of hosts rather than the number of Vulns. It could easily also include the impacted host names in the report. but not had time to do that.

I have also made changes to include the references in the word and excel reports and the scan results per port in the host listing. this making it a much more useful report for me.

Not sure how I provide this code back to you for review as cannot branch the code and provide a pull request.

Changes have been made to export.py, PArsed_data.py and parser.py

Please advise

@TheGroundZero
Copy link
Owner

Hi @ididwhat

Thank you for your help and effort.

For me it would be easiest if you could create a PR.
If you made changes to only one file, you should normally be able to view the source of that file on github (e.g. https://github.com/TheGroundZero/openvasreporting/blob/master/openvasreporting/libs/parser.py) and then click the pencil icon at the top right to propose a modification.
I think (but am not sure) that you can make modifications to multiple files within 1 PR using this method.

The preferred way is ofcourse to make a fork, do your modifications and then push a pull request.

For more info, you can have a look at the Git Docs, e.g. https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants