Espionage/sabotage is not a war crime https://ihl-databases.icrc.org/customary-ihl/eng/docs/v2_rul...
If it done by state military agency, then it's act of war.
If it done by civilians without support of and not directed by state, then it's terrorism.
If it done by civilians, with support of or directed by state, then it's state sponsored terrorism, a war crime.
There is no excuse for not wearing of uniform for warriors at their own country.