From the Washington Post:
Federal agents may take a traveler’s laptop or other electronic device to an off-site location for an unspecified period of time without any suspicion of wrongdoing, as part of border search policies the Department of Homeland Security recently disclosed. Also, officials may share copies of the laptop’s contents with other agencies and private entities for language translation, data decryption, or other reasons, according to the policies, dated July 16 and issued by two DHS agencies, US Customs and Border Protection and US Immigration and Customs Enforcement.
The full policy is available and it says that they have to destroy the information retained unless there is “probable cause“, except..
Copies may be retained by an assisting Federal agency or entity only if and to the extent that it has the independent legal authority to do so – for example, when the information is of national security or intelligence value.
So if you’re working for a company that competes with a US one you should probably be careful..
Update: Steve Bellovin points out that this applies when you leave America, too..