US border patrol device search
US Border Patrol officials conducting their search Getty

In response to a set of questions by Senator Ron Wyden (D-OR) about the practice of searching electronic devices and pressuring travellers into providing access to their social media accounts, acting US Customs and Border Protection Commissioner Kevin McALeenan has clarified on what officials are allowed to look at while searching travellers' at the border.

A letter from McALeenan obtained by NBC News acknowledges that CBP can search locally stored data (images, videos, contacts, call history, text messages) to determine if a device contains anything that could be a threat to national security. However, it cannot inspect data stored remotely on cloud servers.

"CBP's authority to conduct border searches extends to all merchandise entering or departing the United States, including information that is physically resident on an electronic device transported by an international traveler," the letter read. "Therefore, border searches conducted by CBP do not extend to information that is located solely on remote servers".

The letter draws a stark distinction between data stored on a device and on the cloud but the word "solely" in the phrase leaves a major loophole. Meaning, if your files are stored on the cloud but its app is present on your device at the time of the search, officials can still look at your data. The same goes for emails and Facebook posts, which are usually accessible via mobile apps.

"With my concurrence, CBP's Office of Field Operations issued [guidelines] in April 2017 reminding its officers of this precise aspect of CBP's border search policy," McALeenan said. However, he did not make those "law enforcement sensitive" guidelines public.

Travellers can refuse to hand over passwords

On online social media searches, the acting CBP commissioner also noted that travellers can refuse to unlock their phones or hand over their passwords, but in such cases officials would reserve the right to detain the device or deny entry even to visa-holding non-citizens.

McALeenan's letter addressed all questions by Wyden, except one – statistics detailing the number of cell phone searches conducted at the border on behalf of other government agencies (FBI, Drug Enforcement Administration, National Counterterrorism Center etc).

However, the senator's spokesperson said that he "will continue to push both for an answer to that question and a statistic on the number of Americans searched".