cisagov / cyhy-system

Cyber Hygiene system and overall documentation/issue tracking
Creative Commons Zero v1.0 Universal
6 stars 0 forks source link

Add Geolocation Data to Hosts.csv #92

Open KeithBonesJr opened 1 year ago

KeithBonesJr commented 1 year ago

💡 Summary

Please add Geolocation data to the host.csv file embedded within the weekly vulnerability scanning report.

Motivation and context

Add geolocation data for IPs in to hosts.csv file so stakeholders can understand which IPs are showing up where on the report map.

Implementation notes

Believe an update may be needed here: https://github.com/cisagov/cyhy-reports/blob/develop/cyhy_report/customer/generate_report.py

Acceptance criteria

How do we know when this work is done?

mcdonnnj commented 1 year ago

How should the geolocation data be represented in the CSV? I believe it is stored in a list as [longitude, latitude] in the database. The raw database value will not translate correctly to a CSV value without formatting. Additionally the code segment you show is working with data from the host_scans collection which does not contain geolocation information. We would need to pull in information from the hosts collection to populate this value.

KeithBonesJr commented 1 year ago

Hey @mcdonnnj we are capturing all of the items from JIRA prior to working them. The code snippets above are from a developer that was previously on our team.

mcdonnnj commented 1 year ago

Hey @mcdonnnj we are capturing all of the items from JIRA prior to working them. The code snippets above are from a developer that was previously on our team.

@KeithBonesJr That's fine I just wanted to point out that the source data used in the code snippet does not contain the data that is desired. I don't believe the data that is desired is ever pulled in for report generation as I don't believe any HostDocs (where geolocation information about hosts is stored) are ever retrieved.

KeithBonesJr commented 1 year ago

@mcdonnnj going through and cleaning up a few of our issues now and removing code suggestions as well as unassigning our team members if they are not working to submit a PR for you all on the issue.