I believe the answer is: find it constitutional under the Commerce Clause.
The commerce clause stated that the congress has the full power in regulating our country's relationship with another country regarding trade activities.
So, it should be fairly easy for congress to make law that determine the legality of various products