Unfortunately, CBP has a right for extensive search if they have a reasonable suspicion of an immigration violation or crime, which is not clearly defined. Are you a suspect because your name matches some criminal’s name? Because you travelled to Middle East? Because you carry too much cash? So, the first thing to ask (as with all unreasonable searches) “do you have a reasonable suspicion etc.? What’s your name, officer? I want to call my lawyer”. Another thing, if they can perform extensive search, does it mean they can keep all your data? I guess, this comes to Privacy Act. Wipe it out for me, please.