James Martin/CNET

Police are required to get a warrant to search through your devices, but the Department of Homeland Security's border patrol agents haven't been following those rules, documents show.

The American Civil Liberties Union and the Electronic Frontier Foundation filed evidence in court on Tuesday detailing testimony and documents on how the DHS has allowed its agents to search through people's phones and laptops without a warrant.

The ACLU and the EFF obtained this evidence through discovery as part of its ongoing lawsuit against the DHS. They're suing on behalf of 11 travelers whose electronics were searched at the border without warrants.

The filed documents show that Customs and Border Protection as well as Immigration and Customs Enforcement gave border agents blanket authority to search and seize travelers' devices without a warrant or even probable cause.

"The border is not a lawless place, ICE and CBP are not exempt from the Constitution, and the information on our electronic devices is not devoid of Fourth Amendment protections," Esha Bhandari, a staff attorney with the ACLU's Speech, Privacy, and Technology Project, said in a statement.

If you're traveling across US borders, your electronics are subject to searches by the US government. While your Fourth Amendment rights protect you from searches without a warrant, it hasn't been adhered to at the border. Until a court makes a decision, DHS still has the power to comb through your devices at US borders.

The information on our electronic devices is not devoid of Fourth Amendment protections. Esha Bhandari, staff attorney with the ACLU's Speech, Privacy, and Technology Project

With this power, border agents can look at all your photos, your messages, the videos on your phone, or any sensitive file you have on you while you're traveling. And your passwords won't protect you, either.

"Passcodes or other means of access may be requested and retained as needed to facilitate the examination of an electronic device or information contained on an electronic device, including information on the device that is accessible through software applications present on the device," according to the DHS' directives.

The filed documents show that border agents were allowed to search travelers' devices for several unrelated reasons, including enforcing tax and bankruptcy laws, as well as helping with outside investigations involving other agencies.

The agents were also allowed to share any information they found, including with local and federal law enforcement authorities, according to the court filing.

In some cases, even if you weren't under investigation or considered suspicious, just being potentially linked to someone who is was enough reason for border agents to search devices without a warrant, the documents showed.

"The evidence we have presented the court shows that the scope of ICE and CBP border searches is unconstitutionally broad," EFF senior staff Attorney Adam Schwartz said in a statement. "ICE and CBP policies and practices allow unfettered, warrantless searches of travelers' digital devices, and empower officers to dodge the Fourth Amendment when rifling through highly personal information contained on laptops and phones."

Now playing: Watch this: Border security: Tech options that could replace a wall

The DHS conducted more than 33,000 searches on devices in 2018, a jump from the 30,200 device searches it conducted in 2017. In 2015, there were only 4,764 device searches.

ICE and CBP declined to comment.

To justify the high number, John Wagner, CBP's deputy executive assistant commissioner, said in a statement last year: "In this digital age, border searches of electronic devices are essential to enforcing the law at the US border and to protecting the American people."

Civil rights advocates counter that these warrantless searches violate people's constitutional rights. Last November, an Apple employee flying from Sweden to the US was repeatedly asked to unlock his Apple-issued phone and laptop for searches and threatened with seizure of his devices and arrest.

With the new evidence, the ACLU and EFF are asking a federal court to rule without trial that the DHS violated constitutional rights by allowing these warrantless searches, and require the agency to obtain warrants to conduct its thousands of device searches.

Originally published at 10:30 a.m. PT.

Updated at 11:12 a.m.: To include that ICE and CBP declined to comment.