The Posse Comitatus I believe is not applicable because those crossing the border without going through customs are criminalsWhich makes crossing the border illegally a matter for civil law enforcement and not the military.
and not US citizens and therefore are indeed foreign enemies and are also invaders. They are subject to military action and subsequent destruction.
Actually, they aren't. They are criminals; they are not members of a hostile armed force. There is a significant difference between the two, and that affects what we can legally do about the situation.
If in WWII Japanese decided to send ships of unarmed to the shores of CA or HI what would Truman have done? It matters not what weapon they carry because they are invading and are not welcome and are in fact an enemy of the Constitution as they intend to do harm. There can be no "utility" argument used to excuse the fact they are indeed invaders and subject to destruction. If you do not understand the concept of a "utility" argument please respond and I will try to help you out.