Space.SISKO: How long before they reach Cardassia Prime?
KIRA: Fifty two hours.
WORF: If the Klingon Empire has reverted to the old practices, they will occupy the Cardassian homeworld, execute all government officials, and install an imperial overseer to put down any further resistance.
SISKO: I think it's about time we had a talk with the Cardassians.
Not a nice place.
Michael Eddington was still in a cell after Cardassia joined the Dominion and after the Maquis had been obliterated by a culling fleet. I suppose they could have gotten him on vandalism charges for what he did to all those Starships or that planet rather than conspiracy, sedition and treason, since operating a 5th column inside Starfleet, a top secret institution, using Starfleet's resources to make ethically upside down star chamber decisions without oversight...
From without or within the Maquis and Section 31 seemed to have similar parasitic relationships with starfleet and the federation that they are simultaneously hunted and loved.
The law is the law; additional facts don't change it. What changes is how it is applied on a case-by-case basis, as it always does. Some people will get off, others not - depending, as you say, on the type of charges laid.
Space is not a nice place. Agreed. Gene Roddenberry's vision of a playground where people share all their toys is really the one place where his vision is nice, but ... overly optimistic.
Afghanistan, Iraq, Syria, Libya, Sudan, Sierra Leone, the West Bank, the killing fields of Cambodia and Rwanda -- not nice places either. And yeah, you can't usually apply the law in the middle of a conflict. But after the dust settles it's still there, and then there can be (unfortunately too rarely) a reckoning. (I just finished a story on post-conflict situations, called "After the Ashes" -- link below)
All this to say I'd probably have an easier time getting Chakotay and his folks off than Michael Eddington, for a variety of reasons, but I'd sure give it the old college try.