It's horrible but the case-law seems fairly well settled; various courts have ruled that lots of searches that would otherwise violate the 4th Amendment are totally permissible for CBP agents within 100 miles of the border and at customs checkpoints within international airports. I'd love to be surprised if there is a legitimate case here.
- Under Martinez-Fuerte, CBP can briefly question anyone at a checkpoint within 100 miles of the US border to ascertain their citizenship. The only privilege over usual reasonable suspicion / probable cause searches is to ascertain citizenship (so searching your glove compartment or your pockets isn't granted).
- There's a border search exception _passing through the border_, which allows for CBP to search you & your possessions, with _no_ requirement for reasonable suspicion nor a warrant.
- Under Cotterman, the border search exception does _not_ extend to forensic examination of your devices. The agents need reasonable suspicion or a warrant or consent.