You're absolutely right. The Supreme Court has ruled (Carol v United States '25) that constitutional protections must be balanced with a sovereign's interests at ports of entry like international borders and shipping ports. As long as this is targeted at non-residents (anyone without US citizenship, a green card, or a work visa like the H1B) you can make a strong argument that they have no right of anonymity because it is in the sovereign's interest to defend against someone legally entering the country under false pretenses. This makes sense without even having to resort to the terrorism Boogeyman.