For anyone preparing for a trip across the Canadian border, a new online guide from the B.C. Civil Liberties Association offers some sobering advice about digital privacy.

The handbook, released Wednesday, outlines your rights at Canadian crossings and U.S. customs pre-clearance areas in some airports.

There are few legal restrictions for electronic searches by Canada Border Services Agency officers, according to Meghan McDermott, staff counsel for the BCCLA.

"It's wide open. They're allowed to search anything and they're allowed to do that without suspicion or without a court order," she told CBC News.

That doesn't necessarily mean they'll go over every photo and email on your phone — CBSA training manuals say anyone conducting a search without suspicion of wrongdoing should only look at a file long enough to determine if it contains something illegal, according to the handbook.

But legally speaking, the courts haven't placed any limits on CBSA searches, and border agents can copy the entire contents of your device.

By law, border guards are only permitted to conduct a search for evidence of material being brought into the country illegally, or information about someone's admissibility to the country, per the Customs Act or the Immigration and Refugee Protection Act.

If your phone or laptop contains sensitive information — like privileged legal documents or private medical files — the only sure way to protect it is to leave it at home, the handbook advises.

In an email Wednesday, Public Safety Minister Ralph Goodale said it was not CBSA policy to routinely examine travellers' cellphones or other devices.

"CBSA officers are trained to conduct all border examinations with as much respect for privacy as possible," Goodale said.

"Officers may only conduct a search if there are multiple indicators that evidence of contraventions may be found on a device. Their initial examinations are cursory in nature and only increase in intensity based on emerging indicators."

He said CBSA policy requires officers to disable a device's internet connection so the search only concentrates on material stored on the device.

Tricky to nail down policies

Compiling the information in the guide was no easy task, according to McDermott. Staff at the BCCLA had to comb through court records, parliamentary reports and Access to Information requests.

"Unless you're a legal professional or somebody who just has a keen interest in this, the average traveller wouldn't have the benefit of knowing any of this. They wouldn't know how best to interact with the border officials and then what the border officials might do with their devices."

CBSA agents are trained to only examine files long enough to determine if they contain something illegal. (Darryl Dyck/Canadian Press)

Some questions still don't have clear answers, though, such as whether border guards can demand passwords. Until recently, CBSA policy said officers shouldn't arrest anyone who refuses to give up their login information, but that is no longer in effect and the issue has yet to be directly addressed in court.

In the end, the guide says most people whose devices are searched are not chosen at random. Border officers tend to target people who have been previously identified as high-risk travellers and those suspected of carrying illegal materials like child pornography and hate literature, according to the BCCLA.

The handbook details a long list of typical targets, including:

Single men travelling alone.

Travellers who have purchased last-minute tickets.

People who seem nervous.

Those carrying multiple electronic devices, including hard drives.

Importers of items that CBSA might consider suspicious, like manga and anime. The federal government says, however, that border officers are trained to recognize that most anime does not depict child pornography.

The guide also raises concerns about the potential for racial or religious profiling, which it describes as illegal but "extremely hard to prove."

The handbook includes advice for anyone whose device has been searched, including how and where to file a complaint about their treatment.

With files from Cory Correia

​Read more from CBC British Columbia