We already have precedent for this with the internment of Japanese who were American citizens in ww2. I don’t know how FDR got around the constitution on that one, but around it he got and with near full support of the citizenry.
If you read the actual words of the 4th and 5th amendments, you'll see that detention without formal charges (habeus corpus denial) is not really covered. Meanwhile, back in the main body of the Constitution:
The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it.
Art. II Section 9.
This seems to be for those caputured while engaged in hostilities against the US and/or it's allies. At least in spirit, the fifth amendment's exemption:
"except in cases arising in the land or naval forces, or in the militia when in actual service in time of War or public danger;"
would seem to apply. Why should terrorists and illegal combatants (even a rebel within the US is a legal combatent if they wear a uniform or other identifying items, and are part of a chain of command) have more rights than members of our own military and militia forces?
Could it be abused? Sure, but someone willing to do so isn't going to need such a law to perpetuate such abuses.
PS, Herr Blucher ... do the horses neigh at the mention of your name too?