It's a trick to spot sometimes. I have had passengers use coat pockets, large sweaters, and bags to try to bring beer aboard.
You also have to be careful how you react. If you tell them to pitch it and a cop sees a beer sail out the window, that could draw attention you don't want and give them probable cause. I have pulled into a gas station and insisted that any beer, open or otherwise, is placed in the trash. I have also pulled over into a side street and just ejected the riders and ended the trip.
I have also made people dispose of drinks, and made sure that anything unopened goes in the trunk.
But the key is, you have to have seen it to prevent it. So try to get a good look before they climb in.