In one of the first war-on-terror cases to reach the court, Rasul v. Bush, a majority agreed that the foreign detainees at Guantánamo had a right to file habeas corpus petitions. Scalia strongly dissented, as one might have expected given the fact that the Constitutions protections are generally intended for only American citizens.
This is nonsense. The Constitution's protections are intended for everyone under the jurisdiction of the United States government.
Many, such as myself, would go even farther and note that the Constitution grants no rights. Those specific things mentioned in the Constitution acrue to you by virtue of your being born a human being. The Constitution recognises these pre-existing rights and merely states that the government may not justly infringe upon them.
That's my understanding of it, too.