It need not be uniforms. Even a simple armband of some kind, as long as all your guys are wearing them, can be considered sufficient uniform to entitle you to protection under the law.
It kinda gets sticky though, because after WWII, the victorious Allies declared that partisans were actually legitimate combatants, even though they did not wear any kind of identification. In other words, it’s okay if your side does it. That left the door open to others doing it, and then the legal picture gets murky.
The post upthread about pirates being ‘Enemies of Humanity’ is probably the best answer. They have no legal protections, nor do those who harbor them.





