In the days of the Temple, how was the land protected from attack during the shalosh regalim, when all males should have been in Jerusalem? It seems like a perfect setup for an ancient version of the Yom Kippur War
AskTheRabbi.org answered:
Good question. The Talmud in Tractate Pesachim (8b) discusses this and teaches that there was a Divine promise that no harm would come to their property nor persons when fulfilling the command of going to the Temple for the Festivals.