OK, in regards to “Posse Comitatus”
Active duty military can be sent to the border to “support” operations. They simply can not participate in any actual law enforcement activities. They can not apprehend, or detain anyone. They could possibly be used as exterior security/immediate reaction force if detention facilities are established.