This basically happened. It's TNG 2x01, "The Outrageous Okona." Some schmuck in a jumped-up cargo shuttle harasses the Enterprise, and Riker asks, 'can lasers even hit us?'
The pilot is a chauvanistic brigand, on the run, having dumped his cargo... wearing a white shirt and dark vest. It is genuinely surprising Memory Alpha does not explicitly call this a Han Solo expy.
