cisagov / cyhy-core

Core code for Cyber Hygiene (CyHy)
Other
8 stars 10 forks source link

Update list of restricted countries #91

Closed jeffkause closed 7 months ago

jeffkause commented 7 months ago

πŸ—£ Description

This PR updates the restricted countries list, which is used to disallow IP addresses associated with those countries so that they are not added in to the CyHy database.

πŸ’­ Motivation and context

New countries were added by CISA to the restricted countries list, so we must update the code to reflect that.

Resolves #90.

πŸ§ͺ Testing

The names of the new restricted countries were validated against this list of country names, which is used by the MaxMind geolocation databases.

This change was tested by building a new Docker image containing the updated code, then attempting to add an IP address from each country on the restricted list to a CyHy stakeholder. As expected, each IP address was disallowed. See sample output below:

$ cyhy-ip add 169.159.208.10 TEST
***Found IPs in restricted countries***
DR Congo:
    169.159.208.10/32
Cannot continue!

βœ… Pre-approval checklist

βœ… Post-merge checklist