If you want to ship out of the Montreal port you agree that the port authority has the right to open the container.
If the container is found to have stolen goods the fine is 5x the value of the stolen goods. If it is a bogus entity that showed up with the container the liability goes to the logistic company or the ship itself. Trust me, things will get real efficient in making sure all goods are legal and checked beforehand.