Exodus 22:2

If the thief is found breaking in, and he is struck so that he dies, there shall be no guilt for his bloodshed.