cds-snc / tracker

Check whether a Government of Canada domain is adhering to best security practices.
Other
12 stars 9 forks source link

owner without matching subdomain in domains.csv causes keyerror #4

Closed buckley-w-david closed 6 years ago

buckley-w-david commented 6 years ago

https://github.com/cds-snc/tracker/blob/master/data/processing.py#L298

Probably just want to wrap this in a try/except, and or do a quick check 'if in' to determine whether this even a valid ownership domain before continuing.

reproduce:

canada.ca in owner, and not in the domains list.

Assuming we control the input, I'd say not a huge deal, but since we don't, we probably want to assume faulty inbound data and recover gracefully where we can.

(From https://github.com/cds-snc/pulse/issues/139)

buckley-w-david commented 6 years ago

🎉