As a primer:
America’s Founders were concerned about invasion. It was mentioned it four times in the Constitution, though the term was never explicitly defined.
Article I, Section 8, Paragraph 15: The Congress shall have the Power (to) provide for calling forth the Militia to execute the Laws of the Union, suppress Insurrections and repel Invasions;
Article I, Section 9, Paragraph 2: The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in cases of Rebellion or Invasion the public Safety may require it.