In the US the Bill of Rights and most other things only apply to citizens (and maybe lawful residents).
CBP agents have broader authority to conduct searches of non-citizens and their belongings at ports of entry without a warrant, including devices like laptops and phones, to determine admissibility to the United States. Searches of citizens generally require a higher standard of suspicion or a warrant.
In the past, someone has taken a flight between Canada and Mexico while under suspicion of the US authorities, and the plane was forced to land and the person forcefully detained, just because they entered US airspace.
Just losing your ESTA over weed (federally a schedule 1 narcotic) is a fairly small punishment considering the CBP enforces federal law.
CBP agents have broader authority to conduct searches of non-citizens and their belongings at ports of entry without a warrant, including devices like laptops and phones, to determine admissibility to the United States. Searches of citizens generally require a higher standard of suspicion or a warrant.
In the past, someone has taken a flight between Canada and Mexico while under suspicion of the US authorities, and the plane was forced to land and the person forcefully detained, just because they entered US airspace.
Just losing your ESTA over weed (federally a schedule 1 narcotic) is a fairly small punishment considering the CBP enforces federal law.