Whenever a permit or clearance is granted for either a foreign or domestic port, it shall be lawful for the collector of the customs granting the same, if he deems it necessary, under the circumstances of the case, to require a bond to be executed by the master or the owner of the vessel, in a penalty equal to the value of the cargo, and with sureties to the satisfaction of such collector, that the cargo shall be delivered at the destination for which it is cleared or permitted, and that no part thereof shall be used in affording aid or comfort to any person or parties in insurrection against the authority of the United States.
(R.S. § 5321.)