And yet, the United States has been plagued before by immigrant terrorism, and completely solved the problem.
How? Largely by selective deportations of radical immigrants and cutting back on future immigration.
Immigrant terrorists committed many of the most heinous crimes during the anarchism plague of the first third of the 20th century. Anarchists are largely forgotten today, but they were a spectacular annoyance a century ago.