Once a vehicle is legally stopped and the driver or occupant is lawfully arrested, police may routinely search containers within the passenger compartment.
The U.S. Supreme Court in New York vs. Belton, 453 U.S. 454 (1981), established a bright line rule permitting officers to search, without a warrant or probable cause, the passenger compartment contemporaneously with the arrest of the driver. In California vs. Acevedo, 500 U.S. 565 (1991), the court does require probable cause to search a particular closed container.
Courts draw a “curious line” between the search of an automobile that turns up a container and the search of the container itself. It’s a better law enforcement practice for law officers to obtain an independent search warrant. The alert defense attorney will file a motion to suppress and bring the matter before the attention of the court.