cisagov / cyhy-system

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

Update importing stakeholder function #120

Open jeffkause opened 5 months ago

jeffkause commented 5 months ago

💡 Summary

To remove the chance of importing private IP addresses into new stakeholder's scope; include coding to search for the private IP addresses and stop the importing of the JSON file into the VS database.

Motivation and context

During the cyhy-ip check command, a warning is displayed to the operator regarding the private IP address(es) found in the request template. If the operator fails to see this warning, they can run the cyhy-import -s cyhy-ops-production-write XXXX.json or cyhy-ip -s cyhy-ops-production-write add commands and import the private IP addresses in the VS database.

This would be useful because to eliminate errors in the VS database and also allow for different checks in the future.

Implementation notes

Current outcomes:

$ cyhy-ip check 192.168.1.1

IPv4 Private: 1

192.168.1.1/32


$ cyhy-import -s cyhy-ops-production-write XXXXXX.json

(No flag)

Requested outcomes:

$ cyhy-ip check 192.168.1.1

IPv4 Private: 1

192.168.1.1/32


$ cyhy-import -s cyhy-ops-production-write XXXXXX.json

Cannot continue! Some addresses already allocated or reserved:
IPv4 Private: 1

192.168.1.1/32


Acceptance criteria

How do we know when this work is done?

KeithBonesJr commented 5 months ago

Please see same issue here @jeffkause https://github.com/cisagov/cyhy-core/issues/61, either close @climber-girl issue or bump it and close this one. My recommendation, is to grab what you need from the other issue and close it and maybe add a comment saying....being tracking here.