You’ve hit upon something that would make a good discussion in a philosophy class.
WW2 is filled with examples of civilians striking back at their Axis occupiers. Civilians are not supposed to do that. And neither are the Axis occupiers supposed to execute civilians who had nothing to do with those strikes.
So who has the dirty hands here? I suppose that would be determined by the victors. It is they who convene the courts after the war is over.
The Germans killed a large number of men and boys in Kragujevac, Serbia, in reprisal for attacks by the resistance.