As far as the Constitution goes, non-citizens have the same rights as citizens (at least for all the rights given to "persons") and there's no carveout actually in the Constitution for national security or immigration. Practically you have a point given case law but even in cases of immigration and national security these Constitutional rights still apply (regardless of what any branch of either Congress or the president try to do).
You can read the bill of rights here (no mention of citizens or national security): https://www.archives.gov/founding-docs/bill-of-rights-transc...