Airport security in the US is getting more awkward, and with confusing travel bans and other searches at the border, it's hard to keep track of what your rights actually are. Thankfully, the Electronic Frontier Foundation has put together a quick pocket guide with a breakdown of your digital rights.
The pocket guide is a summation of their more detailed digital rights guide, which walks you through your rights for everything from USB dongles to your digital camera. The fact is, if you're crossing into the United States, regardless of whether you're a citizen or a visitor, border agents can ask to look at your digital data. You can always say no to these requests, but that could mean they will detain you, and as the courts grapple with what constituents privacy and what doesn't, it might be easier to just prepare your devices ahead of time instead. The border isn't a Constitution-free zone, but that doesn't mean it isn't a pain in the butt to get through it sometimes.
To that end, the EFF suggests a few simple tricks before you travel to the US, like logging out of any cloud services then deleting the associated apps, backing up all your data, and using full-disk encryption for something like a laptop. If you're just travelling with a phone, the quickest solution is to just delete any apps that connect to cloud services or social networks. If it isn't on your phone, they can't access it. The pocket guide is a handy addition to your travel bag and as useful for foreign visitors as it is US citizens.