War is by definition an illegal act. It just depends on who you're asking and who's jurisdiction you're referring to. Sometimes its convenient to have an international fig-leaf -- a UN resolution, perhaps -- but it would take some persuading that our (US) actions in Iraq, Afghanistan and Syria were legal. (Certainly not for the numbers of locals that were killed, injured and their livelihoods destroyed).
I think we have to admit that a state of war exists between Russia and NATO and, furthermore, something very similar exists between NATO (and the US's allies in the region) and China. Its not quite total war in the WW2 sense, the situation's a bit weird, but then our experience is either shaped by World War or by a very powerful nation invading or intervening with one or more much weaker ones (what used to be called 'police actions' back in the grand old days of Empire). There's also a problem that a country's leadership is disconnected from its populace -- despite a full on propaganda barrage over our various actions in the past I'm yet to be convinced they're legitimate or justified. Also, this sort of thing doesn't help the cause one bit:-
So while I do think that attacks on the software supply chain might be a result of this war, or any war, the more likely cause is still extortion by criminal groups. There's also a burgeoning 'Software as a Fear Source' (SaFS) industry which will do its damnedest to spread FUD.
Incidentally, those that have read other things I've posted know that I'm opposed to sanctions as an industry. Not just because they're relatively ineffective, can have negative long term consequences for us and so on but also because we're developing a huge industry directly involved in anti-competitive behavior. This is going to end up strangling us -- as we all know, once bureaucracy is created it will never die, it will never cease to find reasons for its existence. It will hold us down while the rest of the world just goes on its way, bypassing the has-beens.