So, it is a little ambiguous given the context. Gen. Miley was reportedly in conversation with Gen. Li Zuocheng of the People’s Liberation Army to assure him that joint naval exercises in the South China Sea were not a prelude to an attack that might be feared because of Trump’s general belligerence toward the PRC and upcoming election. Normally, such conversations would take place through diplomatic channels between the US Department of State and corresponding organ of the PRC government with full cognizance of the executive but for obvious reasons that kind of communications were not occurring. For the US to engage in an unprovoked attack upon the forces of another sovereign nation (versus responding to an attack upon US forces) would technically require a declaration of war but of course that expectation has been diluted to meaninglessness by the actions of presidential administrations going back to the Korean War.
Operational Security (OPSEC) is policy governing control of information and exposure to possible foreign agents but is not statute or case law, so ‘violating’ OPSEC is subject to administrative discipline but is not some kind of legal prohibition in and of itself (although OPSEC violations can result in losing security clearance or other penalties involving access to information). Obviously, providing any information about military plans or observations to a potential opponent, even in a general manner, is a violation of OPSEC, although whether it constitutes a legal violation would depend upon the specificity of the infiormation. If Milley actually provided actionable intelligence upon US plans regarding a presumptive attack upon a foreign adversary, it would almost certainly be considered espionage and potentially treason as well as violations of numerous elements of Uniform Code of Military Justice, which are legally actionable violations that could result in both court martial and prosecution in federal court.
What Milley actually did is just offer assurance that any aggressive action by the US military would be conveyed prior to hostilities, which is kind of outside the wheelhouse of the Chairman of the Joint Chiefs of Staff but isn’t illegal per se unless it is done with some motive to compromise the security of the United States or in exchange for personal favoritism, e.g. (to use a term which may still be resident in the minds of some) “quid pro quo”. That Milley felt compelled to do both this and delay exercises speaks to a rather disturbing state of mind that a senior US military officer would feel the need to undertake diplomatic affairs of state, but again this is an issue of policy and not laws as long as no actionable intelligence was conveyed.
What is more disturbing is further down in the article:
Milley also summoned senior officers to review the procedures for launching nuclear weapons, saying the president alone could give the order — but, crucially, that he, Milley, also had to be involved. Looking each in the eye, Milley asked the officers to affirm that they had understood, the authors write, in what he considered an “oath.”
That Gen. Milley felt he needed to remind senior military officers of both the chain of command and imply their responsibility to the country vice fealty to a lame duck political leader who speaks volumes to his concern about the mental stability of Trump and willingness of his supporters to bolster any action, even one as self-destructive as launching a nuclear strike. It argues for a need to curtail executive authority to unilaterally invoke military action and specifically to restrict the frame of ordering the use of nuclear weapons without Congressional review to specifically verified counterstrike actions, if that. But then, there have long been good reasons to be concerned about Trump’s statements regarding nuclear weapons.