I got pulled over and got asked to step out. I complied and as soon as I got to my tailgate and turned around 2 cops were already going through my truck. They didn't ask they just started riffling through my truck. Then they brought in a dog that tore one of my leather seats scratched the hell out of my paint, and they of course were kind enough to leave my truck trashed when they left. I have pics if anyone wants to see em. So now if I'm asked to get out of my truck I roll the windows up and lock the door and demand a warrant. (and people wonder why I avoid police officers)
PS sorry for the mini rant
This, Danny Harless, the ones I've personally encountered, the show "COPS", the crooked stuff in the national news, and finally the crooked stuff that goes on around here, is why I no longer have any respect for them. I once did, but that was long ago before they started hiring my generation and later. Now it is far better to treat them as "cordial enemies". I give them the cards and papers they ask for, I answer no questions. I assume they know what they want to do when they pull me over. Answering questions can only help them decide more charges. Besides, I always fight everything in courts, even a ticket. I don't want to provide the prosecution with evidence from my own mouth! Rather, I want the cop in a position to violate my rights (because I expect he will, he does often, and usually gets away with it) because here in court, he won't get away with it. It can and will negate the whole fiasco.
I like the idea of getting out and locking it behind you. They won't like it, and of course they'll get on the loudspeaker telling you to get back inside, since if you step out, you totally blow up their idea of how the encounter should take place. You make it harder to just search anyway. Now they need your express permission, a warrant, or they will have to take your keys and do it without your permission. Which is what you want, since if you get a good lawyer, you will be well compensated.
Just keep all your papers handy so you won't have to open it back up until you can go.
Proving to a court that the cops had reason to search that vehicle over a traffic stop when it was locked will be hard. Also, even if they do search the vehicle, if you have a locked box inside the vehicle, that WILL require a warrant in most places. Searching a locked box inside of your vehicle without a warrant or permission is most definitely a civil rights infringement. I can't see how taking keys off your person to unlock that box is any different than taking keys off your person to unlock the vehicle.