[a] And before the “ByteDance isn’t American, so the Constitution doesn’t apply” argument, they actually do employ US citizens in a US office. There’s also the fact that the Constitution doesn’t differentiate between citizens and non-citizens, but that seems to be ignored nowadays.
That does not apply on a number of levels.
1) this ban is an act of the executive, not the legislature. It is not a bill.
2) this ban does not declare tik tok illegal (It's not clear what it even means for a product to be against the law).
3) The department of Commerce has a long history of... regulating commerce. It's what it does. If this kind of trade regulation was indeed unconstitutional, someone would have noticed by now.
It's also not clear whether a download is actually an importation, or whether the Department of Commerce has any bearing on a US company (Google) manufacturing new copies of a product based on a foreign design. (The Huawei case is far from decided!)
As for your third point: Someone did notice, and filed a lawsuit in federal court! This is an article about the ongoings about that case.
This action is obviously not a bill of attainder:
https://en.wikipedia.org/wiki/Bill_of_attainder
> A bill of attainder (also known as an act of attainder or writ of attainder or bill of penalties) is an act of a legislature declaring a person, or a group of persons, guilty of some crime, and punishing them, often without a trial.
1) The action was not taken by the legislature,
2) I do not believe it declares TikTok to be "guilty" of any crime,
3) I'm sure the district court judge knows what a bill of attainder is, would have said so if this was one.
Cuban cigars haven't broken any laws. Iranian ceramics haven't broken any laws.
The power to sanction / embargo is a very well established power of the government, and it doesn't require a trial. China has long been in violation of the Trafficking in Persons report[1] and, more recently, the Uyghur Human Rights Policy Act[2]. Violation of the TIP report especially gives a very strong precedent for trade sanctions.
TikTok has been described as a national security threat multiple times by multiple political leaders. You may disagree with that designation, but the resulting ban itself is strongly supported by law and precedent.
[1] https://en.wikipedia.org/wiki/Trafficking_in_Persons_Report
[2] https://en.wikipedia.org/wiki/Uyghur_Human_Rights_Policy_Act