Federal law clearly gives the President exclusive authority to restrict immigration from any country if he deems it necessary. That's why the SC reinstated Trump's EO, that's also why they will eventually rule in his favor. 
No one can deny there's an inherent risk of a terrorist falling through the cracks if the government continues to allow 100,000+ Muslims to immigrate each year from countries that hate America.  
 Saudi Arabia, Pakistani, UAE, Kazakhstan and Afghanistan should be added to the list.