The National Guard is managed by states, so states can use the National Guard to enforce state laws [1]. However, when the president calls on National Guard members, the members become part of the Army and Air Force [2]. Trump is violating the Posse Comitatus Act which prohibits anyone from using the Army or Air Force for law enforcement [3][4]. Exceptions to the Posse Comitatus Act include authorization from Congress and the Insurrection Act (which Trump has not invoked yet) [3][4].
> Trump is violating the Posse Comitatus Act which prohibits anyone from using the Army or Air Force for law enforcement
... It only prohibits this veing done without specific statutory authority. In addition to provisions of the Insurrection Act, specific statutory authority for Presidential use of the National Guard specifically for, among other purpose, executing the laws of the United States is found in 10 USC § 12406 regarding federalizing the Guard [0], which is the basis cited for the recent mobilization. So, the argument that it is violating Posse Comitatus requires arguing as well that the invocation of § 12406 is invalid. There is an argument for that, as § 12406 explicitly requires orders for its purposes shall be issued through the Governors of the states involved, so the argument is that, by bypassing the Governor, Trump is acting outside of the cited statutory authority of § 12406, and therefore also violating Posse Comitatus.
The problem with that technical argument is that it probably achieves nothing in practice even if it works, as the conditions for invoking the Insurrection Act encompass those for § 12406, allow federalizing any of the universal militia (including the Guard) and not just the Guard, and do not require orders through the Governor of the State [1], so if there were found to a legal issue, a new order with the same effect founded in 10 USC § 253 instead of 10 USC § 12406 could immediately be issued.
[1] https://www.brennancenter.org/our-work/research-reports/poss...
[2] https://en.wikipedia.org/wiki/National_Guard_(United_States)
[3] https://www.law.cornell.edu/uscode/text/18/1385
[4] https://www.lawfaremedia.org/article/the-national-guard-in-l...