You don't have a right to kill civilians and being discovered can never be a justification for doing so.
You can only kill actual combatants.