They scan you for illegal cargo (cardamine and artifacts), if they find any they'll ask you to drop it (from what I can tell they'll leave you alone if you do). I don't worry about it tho, I arrive at a planet from the poles and then head towards the docking ring so that I'm not even near the police till the last minute. If they do catch you, i would try and dock before they open fire. If they do open fire as you go in, either buy a new ship on the planet to escape or (if you want to be boring) save the game and reload, they'll cease to be there waiting for you.
That saved my butt once, I was in a dromedary near Tripoli shipyard when a corsair in a Titan told me to drop my loot of 275 gold ("hell no"
, so I docked with Tripoli just as i came under fire. I saved, sold my goods and went out to face the music.
1 badly-equipped dromedary vs. 20 titans and Tripoli shipyard doesn't last long
But when I reloaded everything was hunky-dory!!
----------------------------------------
Eat a third and drink a third and leave the remaining third of your stomach empty. Then, when you get angry, there will be sufficient room for your rage.