A relevant example is the border search exception: https://en.wikipedia.org/wiki/Border_search_exception