I know that most of the constitutional rights apply to foreign people legally visiting.Then they have no other rights under the constitution. It’s an all or nothing document.
But that is a good question.
Do they apply to those here illegally?
What about terrorists who are illegally here, and especially those who commit acts of terrorism inside the USA?